mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 17:26:10 -06:00
10615 filter distinct
This commit is contained in:
parent
b8978277e7
commit
48aa1d6148
@ -1729,7 +1729,8 @@ class CableFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
|
||||
|
||||
def filter_by_cable_end(self, queryset, name, value, side):
|
||||
# Filter by termination id and cable_end type
|
||||
return queryset.filter(**{f'{name}__in': value, 'terminations__cable_end': side})
|
||||
qs = queryset.filter(**{f'{name}__in': value, 'terminations__cable_end': side}).distinct()
|
||||
return qs
|
||||
|
||||
def filter_by_cable_end_a(self, queryset, name, value):
|
||||
# Filter by termination id and cable_end type
|
||||
|
Loading…
Reference in New Issue
Block a user