From f03489f58ee6452f9b0c60d84364f0c67c96b41e Mon Sep 17 00:00:00 2001 From: Thor Selmer Dreier-Hansen <43479811+thordreier@users.noreply.github.com> Date: Fri, 27 Dec 2024 21:11:51 +0100 Subject: [PATCH] Add distinct() to filtering VLANs by assigned interface (#18274) --- netbox/ipam/filtersets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/ipam/filtersets.py b/netbox/ipam/filtersets.py index 033f0a4dc90..f65aba407da 100644 --- a/netbox/ipam/filtersets.py +++ b/netbox/ipam/filtersets.py @@ -1080,7 +1080,7 @@ def filter_interface_id(self, queryset, name, value): 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 @@ def filter_vminterface_id(self, queryset, name, value): return queryset.filter( Q(vminterfaces_as_tagged=value) | Q(vminterfaces_as_untagged=value) - ) + ).distinct() class ServiceTemplateFilterSet(NetBoxModelFilterSet):