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 Jeremy Stretch
parent c6452b33d8
commit 5e31a98488

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):