diff --git a/netbox/ipam/filtersets.py b/netbox/ipam/filtersets.py index 30634850a21..f98f510e570 100644 --- a/netbox/ipam/filtersets.py +++ b/netbox/ipam/filtersets.py @@ -458,7 +458,7 @@ def filter_present_in_vrf(self, queryset, name, vrf): return queryset.filter( Q(vrf=vrf) | Q(vrf__export_targets__in=vrf.import_targets.all()) - ) + ).distinct() class IPRangeFilterSet(TenancyFilterSet, NetBoxModelFilterSet): @@ -738,7 +738,7 @@ def filter_present_in_vrf(self, queryset, name, vrf): return queryset.filter( Q(vrf=vrf) | Q(vrf__export_targets__in=vrf.import_targets.all()) - ) + ).distinct() def filter_device(self, queryset, name, value): devices = Device.objects.filter(**{'{}__in'.format(name): value})