mirror of
https://github.com/netbox-community/netbox.git
synced 2026-02-06 15:26:24 -06:00
Fixes #12144: Ensure consistent treatment of context data when rendering config templates via UI & API
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user