From e17ed6a8ed9b1b4e461129ef3b36d95f945cace5 Mon Sep 17 00:00:00 2001 From: Peter Eckel Date: Wed, 4 Mar 2026 21:22:19 +0100 Subject: [PATCH] Replaced FilterLookup by StrFilterLookup see https://github.com/netbox-community/netbox/pull/21544 --- .../graphql/filters/dnssec_key_template.py | 4 +-- netbox_dns/graphql/filters/dnssec_policy.py | 4 +-- netbox_dns/graphql/filters/nameserver.py | 4 +-- netbox_dns/graphql/filters/record.py | 10 +++---- netbox_dns/graphql/filters/record_template.py | 8 +++--- netbox_dns/graphql/filters/registrar.py | 14 +++++----- .../graphql/filters/registration_contact.py | 28 +++++++++---------- netbox_dns/graphql/filters/view.py | 4 +-- netbox_dns/graphql/filters/zone.py | 12 ++++---- netbox_dns/graphql/filters/zone_template.py | 6 ++-- 10 files changed, 47 insertions(+), 47 deletions(-) diff --git a/netbox_dns/graphql/filters/dnssec_key_template.py b/netbox_dns/graphql/filters/dnssec_key_template.py index 7b813908..9d92f9a0 100644 --- a/netbox_dns/graphql/filters/dnssec_key_template.py +++ b/netbox_dns/graphql/filters/dnssec_key_template.py @@ -3,7 +3,7 @@ import strawberry import strawberry_django from strawberry.scalars import ID -from strawberry_django import FilterLookup +from strawberry_django import StrFilterLookup from netbox.graphql.filters import PrimaryModelFilter from tenancy.graphql.filter_mixins import ContactFilterMixin, TenancyFilterMixin @@ -28,7 +28,7 @@ class NetBoxDNSDNSSECKeyTemplateFilter( TenancyFilterMixin, PrimaryModelFilter, ): - name: FilterLookup[str] | None = strawberry_django.filter_field() + name: StrFilterLookup[str] | None = strawberry_django.filter_field() type: ( Annotated[ "NetBoxDNSDNSSECKeyTemplateTypeEnum", diff --git a/netbox_dns/graphql/filters/dnssec_policy.py b/netbox_dns/graphql/filters/dnssec_policy.py index 4be1a792..52cddd4b 100644 --- a/netbox_dns/graphql/filters/dnssec_policy.py +++ b/netbox_dns/graphql/filters/dnssec_policy.py @@ -2,7 +2,7 @@ import strawberry import strawberry_django -from strawberry_django import FilterLookup +from strawberry_django import FilterLookup, StrFilterLookup from netbox.graphql.filters import PrimaryModelFilter from tenancy.graphql.filter_mixins import ContactFilterMixin, TenancyFilterMixin @@ -26,7 +26,7 @@ class NetBoxDNSDNSSECPolicyFilter( TenancyFilterMixin, PrimaryModelFilter, ): - name: FilterLookup[str] | None = strawberry_django.filter_field() + name: StrFilterLookup[str] | None = strawberry_django.filter_field() status: ( Annotated[ "NetBoxDNSDNSSECPolicyStatusEnum", diff --git a/netbox_dns/graphql/filters/nameserver.py b/netbox_dns/graphql/filters/nameserver.py index 162fb6a0..d2358dd8 100644 --- a/netbox_dns/graphql/filters/nameserver.py +++ b/netbox_dns/graphql/filters/nameserver.py @@ -2,7 +2,7 @@ import strawberry import strawberry_django -from strawberry_django import FilterLookup +from strawberry_django import StrFilterLookup from netbox.graphql.filters import PrimaryModelFilter from tenancy.graphql.filter_mixins import ContactFilterMixin, TenancyFilterMixin @@ -21,7 +21,7 @@ class NetBoxDNSNameServerFilter( TenancyFilterMixin, PrimaryModelFilter, ): - name: FilterLookup[str] | None = strawberry_django.filter_field() + name: StrFilterLookup[str] | None = strawberry_django.filter_field() zones: ( Annotated["NetBoxDNSZoneFilter", strawberry.lazy("netbox_dns.graphql.filters")] | None diff --git a/netbox_dns/graphql/filters/record.py b/netbox_dns/graphql/filters/record.py index 46b64ceb..7d434eba 100644 --- a/netbox_dns/graphql/filters/record.py +++ b/netbox_dns/graphql/filters/record.py @@ -3,7 +3,7 @@ import strawberry import strawberry_django from strawberry.scalars import ID -from strawberry_django import FilterLookup +from strawberry_django import FilterLookup, StrFilterLookup from netbox.graphql.filters import PrimaryModelFilter from tenancy.graphql.filter_mixins import ContactFilterMixin, TenancyFilterMixin @@ -29,8 +29,8 @@ class NetBoxDNSRecordFilter( TenancyFilterMixin, PrimaryModelFilter, ): - name: FilterLookup[str] | None = strawberry_django.filter_field() - fqdn: FilterLookup[str] | None = strawberry_django.filter_field() + name: StrFilterLookup[str] | None = strawberry_django.filter_field() + fqdn: StrFilterLookup[str] | None = strawberry_django.filter_field() view: ( Annotated["NetBoxDNSViewFilter", strawberry.lazy("netbox_dns.graphql.filters")] | None @@ -51,7 +51,7 @@ class NetBoxDNSRecordFilter( Annotated["IntegerLookup", strawberry.lazy("netbox.graphql.filter_lookups")] | None ) = strawberry_django.filter_field() - value: FilterLookup[str] | None = strawberry_django.filter_field() + value: StrFilterLookup[str] | None = strawberry_django.filter_field() disable_ptr: FilterLookup[bool] | None = strawberry_django.filter_field() status: ( Annotated[ @@ -85,5 +85,5 @@ class NetBoxDNSRecordFilter( ) = strawberry_django.filter_field() ipam_ip_address_id: ID | None = strawberry_django.filter_field() - ip_address: FilterLookup[str] | None = strawberry_django.filter_field() + ip_address: StrFilterLookup[str] | None = strawberry_django.filter_field() active: FilterLookup[bool] | None = strawberry_django.filter_field() diff --git a/netbox_dns/graphql/filters/record_template.py b/netbox_dns/graphql/filters/record_template.py index 3d0ccc43..3a198785 100644 --- a/netbox_dns/graphql/filters/record_template.py +++ b/netbox_dns/graphql/filters/record_template.py @@ -2,7 +2,7 @@ import strawberry import strawberry_django -from strawberry_django import FilterLookup +from strawberry_django import FilterLookup, StrFilterLookup from netbox.graphql.filters import PrimaryModelFilter from tenancy.graphql.filter_mixins import ContactFilterMixin, TenancyFilterMixin @@ -25,8 +25,8 @@ class NetBoxDNSRecordTemplateFilter( TenancyFilterMixin, PrimaryModelFilter, ): - name: FilterLookup[str] | None = strawberry_django.filter_field() - record_name: FilterLookup[str] | None = strawberry_django.filter_field() + name: StrFilterLookup[str] | None = strawberry_django.filter_field() + record_name: StrFilterLookup[str] | None = strawberry_django.filter_field() type: ( Annotated[ "NetBoxDNSRecordTypeEnum", strawberry.lazy("netbox_dns.graphql.enums") @@ -43,7 +43,7 @@ class NetBoxDNSRecordTemplateFilter( Annotated["IntegerLookup", strawberry.lazy("netbox.graphql.filter_lookups")] | None ) = strawberry_django.filter_field() - value: FilterLookup[str] | None = strawberry_django.filter_field() + value: StrFilterLookup[str] | None = strawberry_django.filter_field() disable_ptr: FilterLookup[bool] | None = strawberry_django.filter_field() zone_templates: ( diff --git a/netbox_dns/graphql/filters/registrar.py b/netbox_dns/graphql/filters/registrar.py index 938a94f9..35f10269 100644 --- a/netbox_dns/graphql/filters/registrar.py +++ b/netbox_dns/graphql/filters/registrar.py @@ -2,7 +2,7 @@ import strawberry import strawberry_django -from strawberry_django import FilterLookup +from strawberry_django import StrFilterLookup from netbox.graphql.filters import PrimaryModelFilter @@ -16,13 +16,13 @@ @strawberry_django.filter_type(Registrar, lookups=True) class NetBoxDNSRegistrarFilter(PrimaryModelFilter): - name: FilterLookup[str] | None = strawberry_django.filter_field() + name: StrFilterLookup[str] | None = strawberry_django.filter_field() iana_id: ( Annotated["IntegerLookup", strawberry.lazy("netbox.graphql.filter_lookups")] | None ) = strawberry_django.filter_field() - address: FilterLookup[str] | None = strawberry_django.filter_field() - referral_url: FilterLookup[str] | None = strawberry_django.filter_field() - whois_server: FilterLookup[str] | None = strawberry_django.filter_field() - abuse_email: FilterLookup[str] | None = strawberry_django.filter_field() - abuse_phone: FilterLookup[str] | None = strawberry_django.filter_field() + address: StrFilterLookup[str] | None = strawberry_django.filter_field() + referral_url: StrFilterLookup[str] | None = strawberry_django.filter_field() + whois_server: StrFilterLookup[str] | None = strawberry_django.filter_field() + abuse_email: StrFilterLookup[str] | None = strawberry_django.filter_field() + abuse_phone: StrFilterLookup[str] | None = strawberry_django.filter_field() diff --git a/netbox_dns/graphql/filters/registration_contact.py b/netbox_dns/graphql/filters/registration_contact.py index 7845dccf..e627f346 100644 --- a/netbox_dns/graphql/filters/registration_contact.py +++ b/netbox_dns/graphql/filters/registration_contact.py @@ -1,5 +1,5 @@ import strawberry_django -from strawberry_django import FilterLookup +from strawberry_django import StrFilterLookup from netbox.graphql.filters import PrimaryModelFilter @@ -10,16 +10,16 @@ @strawberry_django.filter_type(RegistrationContact, lookups=True) class NetBoxDNSRegistrationContactFilter(PrimaryModelFilter): - name: FilterLookup[str] | None = strawberry_django.filter_field() - contact_id: FilterLookup[str] | None = strawberry_django.filter_field() - organization: FilterLookup[str] | None = strawberry_django.filter_field() - street: FilterLookup[str] | None = strawberry_django.filter_field() - city: FilterLookup[str] | None = strawberry_django.filter_field() - state_province: FilterLookup[str] | None = strawberry_django.filter_field() - postal_code: FilterLookup[str] | None = strawberry_django.filter_field() - country: FilterLookup[str] | None = strawberry_django.filter_field() - phone: FilterLookup[str] | None = strawberry_django.filter_field() - phone_ext: FilterLookup[str] | None = strawberry_django.filter_field() - fax: FilterLookup[str] | None = strawberry_django.filter_field() - fax_ext: FilterLookup[str] | None = strawberry_django.filter_field() - email: FilterLookup[str] | None = strawberry_django.filter_field() + name: StrFilterLookup[str] | None = strawberry_django.filter_field() + contact_id: StrFilterLookup[str] | None = strawberry_django.filter_field() + organization: StrFilterLookup[str] | None = strawberry_django.filter_field() + street: StrFilterLookup[str] | None = strawberry_django.filter_field() + city: StrFilterLookup[str] | None = strawberry_django.filter_field() + state_province: StrFilterLookup[str] | None = strawberry_django.filter_field() + postal_code: StrFilterLookup[str] | None = strawberry_django.filter_field() + country: StrFilterLookup[str] | None = strawberry_django.filter_field() + phone: StrFilterLookup[str] | None = strawberry_django.filter_field() + phone_ext: StrFilterLookup[str] | None = strawberry_django.filter_field() + fax: StrFilterLookup[str] | None = strawberry_django.filter_field() + fax_ext: StrFilterLookup[str] | None = strawberry_django.filter_field() + email: StrFilterLookup[str] | None = strawberry_django.filter_field() diff --git a/netbox_dns/graphql/filters/view.py b/netbox_dns/graphql/filters/view.py index 457005de..116c6ee7 100644 --- a/netbox_dns/graphql/filters/view.py +++ b/netbox_dns/graphql/filters/view.py @@ -2,7 +2,7 @@ import strawberry import strawberry_django -from strawberry_django import FilterLookup +from strawberry_django import FilterLookup, StrFilterLookup from netbox.graphql.filters import PrimaryModelFilter from tenancy.graphql.filter_mixins import ContactFilterMixin, TenancyFilterMixin @@ -21,7 +21,7 @@ class NetBoxDNSViewFilter( TenancyFilterMixin, PrimaryModelFilter, ): - name: FilterLookup[str] | None = strawberry_django.filter_field() + name: StrFilterLookup[str] | None = strawberry_django.filter_field() default_view: FilterLookup[bool] | None = strawberry_django.filter_field() prefixes: ( Annotated["PrefixFilter", strawberry.lazy("ipam.graphql.filters")] | None diff --git a/netbox_dns/graphql/filters/zone.py b/netbox_dns/graphql/filters/zone.py index 11119c6f..451305b6 100644 --- a/netbox_dns/graphql/filters/zone.py +++ b/netbox_dns/graphql/filters/zone.py @@ -3,7 +3,7 @@ import strawberry import strawberry_django from strawberry.scalars import ID -from strawberry_django import FilterLookup +from strawberry_django import FilterLookup, StrFilterLookup from netbox.graphql.filters import PrimaryModelFilter from tenancy.graphql.filter_mixins import ContactFilterMixin, TenancyFilterMixin @@ -28,7 +28,7 @@ class NetBoxDNSZoneFilter( TenancyFilterMixin, PrimaryModelFilter, ): - name: FilterLookup[str] | None = strawberry_django.filter_field() + name: StrFilterLookup[str] | None = strawberry_django.filter_field() view: ( Annotated["NetBoxDNSViewFilter", strawberry.lazy("netbox_dns.graphql.filters")] | None @@ -62,7 +62,7 @@ class NetBoxDNSZoneFilter( | None ) = strawberry_django.filter_field() soa_mname_id: ID | None = strawberry_django.filter_field() - soa_rname: FilterLookup[str] | None = strawberry_django.filter_field() + soa_rname: StrFilterLookup[str] | None = strawberry_django.filter_field() soa_serial: ( Annotated["IntegerLookup", strawberry.lazy("netbox.graphql.filter_lookups")] | None @@ -99,7 +99,7 @@ class NetBoxDNSZoneFilter( | None ) registrar_id: ID | None = strawberry_django.filter_field() - registry_domain_id: FilterLookup[str] | None = strawberry_django.filter_field() + registry_domain_id: StrFilterLookup[str] | None = strawberry_django.filter_field() registrant: ( Annotated[ "NetBoxDNSRegistrationContactFilter", @@ -133,7 +133,7 @@ class NetBoxDNSZoneFilter( ) billing_c_id: ID | None = strawberry_django.filter_field() - rfc2317_prefix: FilterLookup[str] | None = strawberry_django.filter_field() + rfc2317_prefix: StrFilterLookup[str] | None = strawberry_django.filter_field() rfc2317_parent_zone: ( Annotated["NetBoxDNSZoneFilter", strawberry.lazy("netbox_dns.graphql.filters")] | None @@ -141,5 +141,5 @@ class NetBoxDNSZoneFilter( rfc2317_parent_zone_id: ID | None = strawberry_django.filter_field() rfc2317_parent_managed: FilterLookup[bool] | None = strawberry_django.filter_field() - arpa_network: FilterLookup[str] | None = strawberry_django.filter_field() + arpa_network: StrFilterLookup[str] | None = strawberry_django.filter_field() active: FilterLookup[bool] | None = strawberry_django.filter_field() diff --git a/netbox_dns/graphql/filters/zone_template.py b/netbox_dns/graphql/filters/zone_template.py index d366c6a9..e2c0e5f9 100644 --- a/netbox_dns/graphql/filters/zone_template.py +++ b/netbox_dns/graphql/filters/zone_template.py @@ -3,7 +3,7 @@ import strawberry import strawberry_django from strawberry.scalars import ID -from strawberry_django import FilterLookup +from strawberry_django import StrFilterLookup from netbox.graphql.filters import PrimaryModelFilter from tenancy.graphql.filter_mixins import ContactFilterMixin, TenancyFilterMixin @@ -26,7 +26,7 @@ class NetBoxDNSZoneTemplateFilter( TenancyFilterMixin, PrimaryModelFilter, ): - name: FilterLookup[str] | None = strawberry_django.filter_field() + name: StrFilterLookup[str] | None = strawberry_django.filter_field() nameservers: ( Annotated[ "NetBoxDNSNameServerFilter", strawberry.lazy("netbox_dns.graphql.filters") @@ -47,7 +47,7 @@ class NetBoxDNSZoneTemplateFilter( | None ) = strawberry_django.filter_field() soa_mname_id: ID | None = strawberry_django.filter_field() - soa_rname: FilterLookup[str] | None = strawberry_django.filter_field() + soa_rname: StrFilterLookup[str] | None = strawberry_django.filter_field() registrar: ( Annotated[