Fixes #12144: Ensure consistent treatment of context data when rendering config templates via UI & API

This commit is contained in:
jeremystretch
2023-04-03 09:50:07 -04:00
parent f245f07fd9
commit 2805633b16
3 changed files with 9 additions and 6 deletions
+2 -4
View File
@@ -2010,10 +2010,8 @@ class DeviceRenderConfigView(generic.ObjectView):
def get_extra_context(self, request, instance):
# Compile context data
context_data = {
'device': instance,
}
context_data.update(**instance.get_config_context())
context_data = instance.get_config_context()
context_data.update({'device': instance})
# Render the config template
rendered_config = None