Skip to content

Commit

Permalink
Fixes #17362: Fix unicity of VRF returned by filter_present_in_vrf fu…
Browse files Browse the repository at this point in the history
…nction
  • Loading branch information
pl0xym0r authored and jeremystretch committed Sep 11, 2024
1 parent 5f32b23 commit 213eb61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions netbox/ipam/filtersets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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})
Expand Down

0 comments on commit 213eb61

Please sign in to comment.