mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
14637 update to Django 5 (#14675)
* 14637 update to Django 5 * 14637 fix tests * 14637 remove extra assignment * Syntax tweak --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
@@ -182,7 +182,7 @@ class ConfigContextModel(models.Model):
|
||||
|
||||
if not hasattr(self, 'config_context_data'):
|
||||
# The annotation is not available, so we fall back to manually querying for the config context objects
|
||||
config_context_data = ConfigContext.objects.get_for_object(self, aggregate_data=True)
|
||||
config_context_data = ConfigContext.objects.get_for_object(self, aggregate_data=True) or []
|
||||
else:
|
||||
# The attribute may exist, but the annotated value could be None if there is no config context data
|
||||
config_context_data = self.config_context_data or []
|
||||
|
Reference in New Issue
Block a user