1
0
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:
John Anderson
2018-09-18 11:52:12 -04:00
parent e3e9211e8a
commit 4039753b2f
18 changed files with 38 additions and 140 deletions

View File

@ -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