mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 09:28:38 -06:00
9856 fixes to circuits type specifiers
This commit is contained in:
parent
99b01981d4
commit
4fab68a138
@ -1,11 +1,14 @@
|
|||||||
|
from typing import List
|
||||||
|
|
||||||
import strawberry
|
import strawberry
|
||||||
import strawberry_django
|
import strawberry_django
|
||||||
|
|
||||||
from circuits import models
|
from circuits import models
|
||||||
from dcim.graphql.mixins import CabledObjectMixin
|
from dcim.graphql.mixins import CabledObjectMixin
|
||||||
from extras.graphql.mixins import CustomFieldsMixin, TagsMixin, ContactsMixin
|
from extras.graphql.mixins import ContactsMixin, CustomFieldsMixin, TagsMixin
|
||||||
from netbox.graphql.types import ObjectType, OrganizationalObjectType, NetBoxObjectType
|
|
||||||
from tenancy.graphql.types import TenantType
|
from tenancy.graphql.types import TenantType
|
||||||
|
|
||||||
|
from netbox.graphql.types import NetBoxObjectType, ObjectType, OrganizationalObjectType
|
||||||
|
|
||||||
from .filters import *
|
from .filters import *
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
@ -76,3 +79,7 @@ class CircuitType(NetBoxObjectType, ContactsMixin):
|
|||||||
termination_z: CircuitTerminationType | None
|
termination_z: CircuitTerminationType | None
|
||||||
type: CircuitTypeType
|
type: CircuitTypeType
|
||||||
tenant: TenantType | None
|
tenant: TenantType | None
|
||||||
|
|
||||||
|
@strawberry_django.field
|
||||||
|
def terminations(self) -> List[CircuitTerminationType]:
|
||||||
|
return self.terminations.all()
|
||||||
|
@ -738,6 +738,14 @@ if not ENABLE_LOCALIZATION:
|
|||||||
USE_I18N = False
|
USE_I18N = False
|
||||||
USE_L10N = False
|
USE_L10N = False
|
||||||
|
|
||||||
|
#
|
||||||
|
# Strawberry (GraphQL)
|
||||||
|
#
|
||||||
|
STRAWBERRY_DJANGO = {
|
||||||
|
"TYPE_DESCRIPTION_FROM_MODEL_DOCSTRING": True,
|
||||||
|
# "GENERATE_ENUMS_FROM_CHOICES": True,
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Plugins
|
# Plugins
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user