mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
9856 fix tenancy FK
This commit is contained in:
parent
12cca5d0a0
commit
4b56f0b000
@ -35,6 +35,7 @@ class ContactAssignmentsMixin:
|
|||||||
filters=TenantFilter
|
filters=TenantFilter
|
||||||
)
|
)
|
||||||
class TenantType(NetBoxObjectType):
|
class TenantType(NetBoxObjectType):
|
||||||
|
group: Annotated["TenantGroupType", strawberry.lazy('tenancy.graphql.types')] | None
|
||||||
|
|
||||||
@strawberry_django.field
|
@strawberry_django.field
|
||||||
def asns(self) -> List[Annotated["ASNType", strawberry.lazy('ipam.graphql.types')]]:
|
def asns(self) -> List[Annotated["ASNType", strawberry.lazy('ipam.graphql.types')]]:
|
||||||
@ -156,6 +157,7 @@ class TenantGroupType(OrganizationalObjectType):
|
|||||||
filters=ContactFilter
|
filters=ContactFilter
|
||||||
)
|
)
|
||||||
class ContactType(ContactAssignmentsMixin, NetBoxObjectType):
|
class ContactType(ContactAssignmentsMixin, NetBoxObjectType):
|
||||||
|
group: Annotated["ContactGroupType", strawberry.lazy('tenancy.graphql.types')] | None
|
||||||
|
|
||||||
@strawberry_django.field
|
@strawberry_django.field
|
||||||
def assignments(self) -> List[Annotated["ContactAssignmentType", strawberry.lazy('tenancy.graphql.types')]]:
|
def assignments(self) -> List[Annotated["ContactAssignmentType", strawberry.lazy('tenancy.graphql.types')]]:
|
||||||
@ -193,4 +195,6 @@ class ContactGroupType(OrganizationalObjectType):
|
|||||||
filters=ContactAssignmentFilter
|
filters=ContactAssignmentFilter
|
||||||
)
|
)
|
||||||
class ContactAssignmentType(CustomFieldsMixin, TagsMixin, BaseObjectType):
|
class ContactAssignmentType(CustomFieldsMixin, TagsMixin, BaseObjectType):
|
||||||
pass
|
content_type: Annotated["ContentTypeType", strawberry.lazy('netbox.graphql.types')] | None
|
||||||
|
contact: Annotated["ContactType", strawberry.lazy('tenancy.graphql.types')] | None
|
||||||
|
role: Annotated["ContactRoleType", strawberry.lazy('tenancy.graphql.types')] | None
|
||||||
|
Loading…
Reference in New Issue
Block a user