Compare commits

...

2 Commits

Author SHA1 Message Date
Jeremy Stretch
006ceffcf9 Fix filter names
Some checks are pending
CI / build (20.x, 3.12) (push) Waiting to run
CI / build (20.x, 3.13) (push) Waiting to run
CI / build (20.x, 3.14) (push) Waiting to run
2026-01-14 08:13:03 -05:00
Jeremy Stretch
c27ad7a30b Closes #21142: Enable filtering device components by site/location/rack directly via GraphQL API 2026-01-13 16:48:59 -05:00

View File

@@ -38,6 +38,15 @@ class ScopedFilterMixin:
@dataclass
class ComponentModelFilterMixin:
_site: Annotated['SiteFilter', strawberry.lazy('dcim.graphql.filters')] | None = (
strawberry_django.filter_field(name='site')
)
_location: Annotated['LocationFilter', strawberry.lazy('dcim.graphql.filters')] | None = (
strawberry_django.filter_field(name='location')
)
_rack: Annotated['RackFilter', strawberry.lazy('dcim.graphql.filters')] | None = (
strawberry_django.filter_field(name='rack')
)
device: Annotated['DeviceFilter', strawberry.lazy('dcim.graphql.filters')] | None = strawberry_django.filter_field()
device_id: ID | None = strawberry_django.filter_field()
name: FilterLookup[str] | None = strawberry_django.filter_field()