From 4b1dc729e004edaa51a9096f149cef840b7fb9f4 Mon Sep 17 00:00:00 2001 From: Martin Hauser Date: Thu, 28 May 2026 15:21:45 +0200 Subject: [PATCH] fix(extras): Use ContentTypeFilter for EventRule action_object_type Change action_object_type field in EventRuleFilter from StrFilterLookup to ContentTypeFilter for proper content type filtering in GraphQL API. Fixes #22287 --- netbox/extras/graphql/filters.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/netbox/extras/graphql/filters.py b/netbox/extras/graphql/filters.py index 34e888e93..afc1ff8f9 100644 --- a/netbox/extras/graphql/filters.py +++ b/netbox/extras/graphql/filters.py @@ -404,7 +404,9 @@ class EventRuleFilter(CustomFieldsFilterMixin, TagsFilterMixin, ChangeLoggedMode action_type: BaseFilterLookup[Annotated['EventRuleActionEnum', strawberry.lazy('extras.graphql.enums')]] | None = ( strawberry_django.filter_field() ) - action_object_type: StrFilterLookup[str] | None = strawberry_django.filter_field() + action_object_type: Annotated['ContentTypeFilter', strawberry.lazy('core.graphql.filters')] | None = ( + strawberry_django.filter_field() + ) action_object_type_id: ID | None = strawberry_django.filter_field() action_object_id: ID | None = strawberry_django.filter_field() action_data: Annotated['JSONFilter', strawberry.lazy('netbox.graphql.filter_lookups')] | None = (