diff --git a/netbox/ipam/graphql/filters.py b/netbox/ipam/graphql/filters.py index 7421a935ac4..53096af389f 100644 --- a/netbox/ipam/graphql/filters.py +++ b/netbox/ipam/graphql/filters.py @@ -159,6 +159,14 @@ def parent(self, value: list[str], prefix) -> Q: return Q() return q + @strawberry_django.filter_field() + def family( + self, + value: Annotated['IPAddressFamilyEnum', strawberry.lazy('ipam.graphql.enums')], + prefix, + ) -> Q: + return Q(**{f"{prefix}address__family": value.value}) + @strawberry_django.filter_type(models.IPRange, lookups=True) class IPRangeFilter(ContactFilterMixin, TenancyFilterMixin, PrimaryModelFilterMixin):