9856 fix wireless FK

This commit is contained in:
Arthur 2024-03-07 09:58:26 -08:00
parent 38c7d76646
commit 5f56e2daff

View File

@ -33,6 +33,9 @@ class WirelessLANGroupType(OrganizationalObjectType):
filters=WirelessLANFilter filters=WirelessLANFilter
) )
class WirelessLANType(NetBoxObjectType): class WirelessLANType(NetBoxObjectType):
group: Annotated["WirelessLANGroupType", strawberry.lazy('wireless.graphql.types')] | None
vlan: Annotated["VLANType", strawberry.lazy('ipam.graphql.types')] | None
tenant: Annotated["TenantType", strawberry.lazy('tenancy.graphql.types')] | None
@strawberry_django.field @strawberry_django.field
def interfaces(self) -> List[Annotated["InterfaceType", strawberry.lazy('dcim.graphql.types')]]: def interfaces(self) -> List[Annotated["InterfaceType", strawberry.lazy('dcim.graphql.types')]]:
@ -45,4 +48,8 @@ class WirelessLANType(NetBoxObjectType):
filters=WirelessLinkFilter filters=WirelessLinkFilter
) )
class WirelessLinkType(NetBoxObjectType): class WirelessLinkType(NetBoxObjectType):
pass interface_a: Annotated["InterfaceType", strawberry.lazy('dcim.graphql.types')]
interface_b: Annotated["InterfaceType", strawberry.lazy('dcim.graphql.types')]
tenant: Annotated["TenantType", strawberry.lazy('tenancy.graphql.types')] | None
_interface_a_device: Annotated["DeviceType", strawberry.lazy('dcim.graphql.types')] | None
_interface_b_device: Annotated["DeviceType", strawberry.lazy('dcim.graphql.types')] | None