Răsfoiți Sursa

9856 cleanup

Arthur 1 an în urmă
părinte
comite
6090d41b34

+ 1 - 2
netbox/core/graphql/types.py

@@ -15,8 +15,7 @@ __all__ = (
 
 @strawberry_django.type(
     models.DataFile,
-    # fields='__all__',
-    exclude=('data',),  # bug - temp
+    exclude=('data',),
     filters=DataFileFilter
 )
 class DataFileType(BaseObjectType):

+ 3 - 3
netbox/extras/graphql/types.py

@@ -129,11 +129,11 @@ class CustomFieldType(ObjectType):
 
 @strawberry_django.type(
     models.CustomFieldChoiceSet,
-    # fields='__all__',
-    exclude=('extra_choices', ),  # bug - temp
+    fields='__all__',
     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')]]:
@@ -202,7 +202,7 @@ class SavedFilterType(ObjectType):
 
 @strawberry_django.type(
     models.Tag,
-    exclude=['extras_taggeditem_items', 'color'],  # bug - remove color from exclude
+    exclude=['extras_taggeditem_items', ],
     filters=TagFilter
 )
 class TagType(ObjectType):

+ 0 - 1
netbox/ipam/graphql/filters.py

@@ -31,7 +31,6 @@ class ASNFilter(BaseFilterMixin):
     pass
 
 
-# bug - fixme!
 @strawberry_django.filter(models.ASNRange, lookups=True)
 @autotype_decorator(filtersets.ASNRangeFilterSet)
 class ASNRangeFilter(BaseFilterMixin):

+ 4 - 4
netbox/tenancy/graphql/types.py

@@ -137,11 +137,11 @@ class TenantType(NetBoxObjectType):
 
 @strawberry_django.type(
     models.TenantGroup,
-    # fields='__all__',
-    exclude=('parent',),  # bug - temp
+    fields='__all__',
     filters=TenantGroupFilter
 )
 class TenantGroupType(OrganizationalObjectType):
+    parent: Annotated["TenantGroupType", strawberry.lazy('tenancy.graphql.types')] | None
 
     @strawberry_django.field
     def tenants(self) -> List[TenantType]:
@@ -172,11 +172,11 @@ class ContactRoleType(ContactAssignmentsMixin, OrganizationalObjectType):
 
 @strawberry_django.type(
     models.ContactGroup,
-    # fields='__all__',
-    exclude=('parent',),  # bug - temp
+    fields='__all__',
     filters=ContactGroupFilter
 )
 class ContactGroupType(OrganizationalObjectType):
+    parent: Annotated["ContactGroupType", strawberry.lazy('tenancy.graphql.types')] | None
 
     @strawberry_django.field
     def contacts(self) -> List[ContactType]:

+ 2 - 2
netbox/wireless/graphql/types.py

@@ -16,11 +16,11 @@ __all__ = (
 
 @strawberry_django.type(
     models.WirelessLANGroup,
-    # fields='__all__',
-    exclude=('parent',),  # bug - temp
+    fields='__all__',
     filters=WirelessLANGroupFilter
 )
 class WirelessLANGroupType(OrganizationalObjectType):
+    parent: Annotated["WirelessLANGroupType", strawberry.lazy('wireless.graphql.types')] | None
 
     @strawberry_django.field
     def wireless_lans(self) -> List[Annotated["WirelessLANType", strawberry.lazy('wireless.graphql.types')]]: