Add distinct() to filtering VLANs by assigned interface (#18274)

This commit is contained in:
Thor Selmer Dreier-Hansen 2024-12-27 21:11:51 +01:00 committed by GitHub
parent 16917133b2
commit f03489f58e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1080,7 +1080,7 @@ class VLANFilterSet(NetBoxModelFilterSet, TenancyFilterSet):
return queryset.filter(
Q(interfaces_as_tagged=value) |
Q(interfaces_as_untagged=value)
)
).distinct()
def filter_vminterface_id(self, queryset, name, value):
if value is None:
@ -1088,7 +1088,7 @@ class VLANFilterSet(NetBoxModelFilterSet, TenancyFilterSet):
return queryset.filter(
Q(vminterfaces_as_tagged=value) |
Q(vminterfaces_as_untagged=value)
)
).distinct()
class ServiceTemplateFilterSet(NetBoxModelFilterSet):