mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-01 15:13:27 +02:00
fixes #5314 - Fix config context rendering when multiple tags are assgined to an object
This commit is contained in:
@@ -60,7 +60,7 @@ class ConfigContextQuerySet(RestrictedQuerySet):
|
||||
Q(tenants=obj.tenant) | Q(tenants=None),
|
||||
Q(tags__slug__in=obj.tags.slugs()) | Q(tags=None),
|
||||
is_active=True,
|
||||
).order_by('weight', 'name')
|
||||
).order_by('weight', 'name').distinct()
|
||||
|
||||
if aggregate_data:
|
||||
return queryset.aggregate(
|
||||
@@ -95,7 +95,7 @@ class ConfigContextModelQuerySet(RestrictedQuerySet):
|
||||
_data=EmptyGroupByJSONBAgg('data', ordering=['weight', 'name'])
|
||||
).values("_data")
|
||||
)
|
||||
)
|
||||
).distinct()
|
||||
|
||||
def _get_config_context_filters(self):
|
||||
# Construct the set of Q objects for the specific object types
|
||||
|
||||
Reference in New Issue
Block a user