Просмотр исходного кода

Fixes #3027: Ignore empty local context data when rendering config contexts

Jeremy Stretch 6 лет назад
Родитель
Сommit
498f132cad
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      CHANGELOG.md
  2. 1 1
      netbox/extras/models.py

+ 1 - 0
CHANGELOG.md

@@ -17,6 +17,7 @@ v2.5.9 (FUTURE)
 * [#3014](https://github.com/digitalocean/netbox/issues/3014) - Fixes VM Role filtering
 * [#3014](https://github.com/digitalocean/netbox/issues/3014) - Fixes VM Role filtering
 * [#3022](https://github.com/digitalocean/netbox/issues/3022) - Add missing cable termination types to DCIM `_choices` endpoint
 * [#3022](https://github.com/digitalocean/netbox/issues/3022) - Add missing cable termination types to DCIM `_choices` endpoint
 * [#3026](https://github.com/digitalocean/netbox/issues/3026) - Tweak prefix/IP filter forms to filter using VRF ID rather than route distinguisher
 * [#3026](https://github.com/digitalocean/netbox/issues/3026) - Tweak prefix/IP filter forms to filter using VRF ID rather than route distinguisher
+* [#3027](https://github.com/digitalocean/netbox/issues/3027) - Ignore empty local context data when rendering config contexts
 
 
 v2.5.8 (2019-03-11)
 v2.5.8 (2019-03-11)
 
 

+ 1 - 1
netbox/extras/models.py

@@ -720,7 +720,7 @@ class ConfigContextModel(models.Model):
             data = deepmerge(data, context.data)
             data = deepmerge(data, context.data)
 
 
         # If the object has local config context data defined, merge it last
         # If the object has local config context data defined, merge it last
-        if self.local_context_data is not None:
+        if self.local_context_data:
             data = deepmerge(data, self.local_context_data)
             data = deepmerge(data, self.local_context_data)
 
 
         return data
         return data