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
This commit is contained in:
Martin Hauser 2026-05-28 15:21:45 +02:00 committed by Jeremy Stretch
parent 77a991711e
commit 4b1dc729e0
1 changed files with 3 additions and 1 deletions

View File

@ -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 = (