mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
refactored UI for local config context
This commit is contained in:
@ -703,6 +703,11 @@ class ConfigContext(models.Model):
|
||||
|
||||
class ConfigContextModel(models.Model):
|
||||
|
||||
local_context_data = JSONField(
|
||||
blank=True,
|
||||
null=True,
|
||||
)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
@ -717,8 +722,8 @@ class ConfigContextModel(models.Model):
|
||||
data.update(context.data)
|
||||
|
||||
# If the object has local config context data defined, that data overwrites all rendered data
|
||||
if self.local_config_context_data is not None:
|
||||
data.update(self.local_config_context_data)
|
||||
if self.local_context_data is not None:
|
||||
data.update(self.local_context_data)
|
||||
|
||||
return data
|
||||
|
||||
|
Reference in New Issue
Block a user