From 3b30aa965fabfbab0175e4f663968f77aeb35b01 Mon Sep 17 00:00:00 2001 From: Arthur Date: Wed, 13 Mar 2024 15:21:18 -0700 Subject: [PATCH] 9856 cleanup --- netbox/extras/graphql/types.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/netbox/extras/graphql/types.py b/netbox/extras/graphql/types.py index efb2551ac..c301b26b2 100644 --- a/netbox/extras/graphql/types.py +++ b/netbox/extras/graphql/types.py @@ -129,19 +129,18 @@ class CustomFieldType(ObjectType): @strawberry_django.type( models.CustomFieldChoiceSet, - fields='__all__', + exclude=('extra_choices', ), filters=CustomFieldChoiceSetFilter ) class CustomFieldChoiceSetType(ObjectType): - extra_choices: List[List[str]] @strawberry_django.field def choices_for(self) -> List[Annotated["CustomFieldType", strawberry.lazy('extras.graphql.types')]]: return self.choices_for.all() @strawberry_django.field - def extra_choices(self) -> List[str]: - return self.extra_choices + def extra_choices(self) -> List[str] | None: + return list(self.extra_choices) @strawberry_django.type(