mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-09 01:49:35 -06:00
Fixes #20253: GraphQL filter by contacts (#20288)
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
* filter models by contacts * remove unsed import * simpler solution
This commit is contained in:
parent
a173a9b4ac
commit
55cda3ca45
@ -9,7 +9,7 @@ from core.graphql.filter_mixins import BaseFilterMixin
|
|||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from netbox.graphql.filter_lookups import TreeNodeFilter
|
from netbox.graphql.filter_lookups import TreeNodeFilter
|
||||||
from .filters import ContactFilter, TenantFilter, TenantGroupFilter
|
from .filters import ContactAssignmentFilter, TenantFilter, TenantGroupFilter
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
'ContactFilterMixin',
|
'ContactFilterMixin',
|
||||||
@ -19,7 +19,7 @@ __all__ = (
|
|||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class ContactFilterMixin(BaseFilterMixin):
|
class ContactFilterMixin(BaseFilterMixin):
|
||||||
contacts: Annotated['ContactFilter', strawberry.lazy('tenancy.graphql.filters')] | None = (
|
contacts: Annotated['ContactAssignmentFilter', strawberry.lazy('tenancy.graphql.filters')] | None = (
|
||||||
strawberry_django.filter_field()
|
strawberry_django.filter_field()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user