1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

9856 type updates

This commit is contained in:
Arthur
2024-02-22 16:35:24 -08:00
parent 3c24cf97b6
commit d4812b28fd
8 changed files with 130 additions and 18 deletions

View File

@ -1,4 +1,4 @@
from typing import List
from typing import Annotated, List
import strawberry
import strawberry_django
@ -59,12 +59,15 @@ class CircuitTerminationType(CustomFieldsMixin, TagsMixin, CabledObjectMixin, Ob
@strawberry_django.type(
models.CircuitType,
# fields='__all__',
exclude=['color',], # bug - remove color from exclude
fields='__all__',
filters=CircuitTypeFilter
)
class CircuitTypeType(OrganizationalObjectType):
pass
color: str
@strawberry_django.field
def circuits(self) -> List[Annotated["CircuitType", strawberry.lazy('circuits.graphql.types')]]:
return self.circuits.all()
@strawberry_django.type(