mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
Add distinct() to filtering VLANs by assigned interface (#18274)
This commit is contained in:
parent
16917133b2
commit
f03489f58e
@ -1080,7 +1080,7 @@ class VLANFilterSet(NetBoxModelFilterSet, TenancyFilterSet):
|
|||||||
return queryset.filter(
|
return queryset.filter(
|
||||||
Q(interfaces_as_tagged=value) |
|
Q(interfaces_as_tagged=value) |
|
||||||
Q(interfaces_as_untagged=value)
|
Q(interfaces_as_untagged=value)
|
||||||
)
|
).distinct()
|
||||||
|
|
||||||
def filter_vminterface_id(self, queryset, name, value):
|
def filter_vminterface_id(self, queryset, name, value):
|
||||||
if value is None:
|
if value is None:
|
||||||
@ -1088,7 +1088,7 @@ class VLANFilterSet(NetBoxModelFilterSet, TenancyFilterSet):
|
|||||||
return queryset.filter(
|
return queryset.filter(
|
||||||
Q(vminterfaces_as_tagged=value) |
|
Q(vminterfaces_as_tagged=value) |
|
||||||
Q(vminterfaces_as_untagged=value)
|
Q(vminterfaces_as_untagged=value)
|
||||||
)
|
).distinct()
|
||||||
|
|
||||||
|
|
||||||
class ServiceTemplateFilterSet(NetBoxModelFilterSet):
|
class ServiceTemplateFilterSet(NetBoxModelFilterSet):
|
||||||
|
Loading…
Reference in New Issue
Block a user