mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-29 03:46:25 -06:00
Add distinct() to filtering VLANs by assigned interface
This commit is contained in:
parent
1e5f79a8ed
commit
ee1de42607
@ -1078,7 +1078,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:
|
||||||
@ -1086,7 +1086,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