mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-19 17:59:11 -06:00
9856 cleanup
This commit is contained in:
parent
6090d41b34
commit
3b30aa965f
@ -129,19 +129,18 @@ class CustomFieldType(ObjectType):
|
|||||||
|
|
||||||
@strawberry_django.type(
|
@strawberry_django.type(
|
||||||
models.CustomFieldChoiceSet,
|
models.CustomFieldChoiceSet,
|
||||||
fields='__all__',
|
exclude=('extra_choices', ),
|
||||||
filters=CustomFieldChoiceSetFilter
|
filters=CustomFieldChoiceSetFilter
|
||||||
)
|
)
|
||||||
class CustomFieldChoiceSetType(ObjectType):
|
class CustomFieldChoiceSetType(ObjectType):
|
||||||
extra_choices: List[List[str]]
|
|
||||||
|
|
||||||
@strawberry_django.field
|
@strawberry_django.field
|
||||||
def choices_for(self) -> List[Annotated["CustomFieldType", strawberry.lazy('extras.graphql.types')]]:
|
def choices_for(self) -> List[Annotated["CustomFieldType", strawberry.lazy('extras.graphql.types')]]:
|
||||||
return self.choices_for.all()
|
return self.choices_for.all()
|
||||||
|
|
||||||
@strawberry_django.field
|
@strawberry_django.field
|
||||||
def extra_choices(self) -> List[str]:
|
def extra_choices(self) -> List[str] | None:
|
||||||
return self.extra_choices
|
return list(self.extra_choices)
|
||||||
|
|
||||||
|
|
||||||
@strawberry_django.type(
|
@strawberry_django.type(
|
||||||
|
Loading…
Reference in New Issue
Block a user