Skip to content

Commit a1aaf46

Browse files
authored
Fixes #20466: Correct handling of assigned filter logic (#20538)
1 parent 2a1d315 commit a1aaf46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox/ipam/graphql/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class IPAddressFilter(ContactFilterMixin, TenancyFilterMixin, PrimaryModelFilter
170170

171171
@strawberry_django.filter_field()
172172
def assigned(self, value: bool, prefix) -> Q:
173-
return Q(assigned_object_id__isnull=(not value))
173+
return Q(**{f"{prefix}assigned_object_id__isnull": not value})
174174

175175
@strawberry_django.filter_field()
176176
def parent(self, value: list[str], prefix) -> Q:

0 commit comments

Comments
 (0)