9856 cleanup

This commit is contained in:
Arthur 2024-03-13 14:50:41 -07:00
parent da0c23bc0c
commit 6090d41b34
5 changed files with 10 additions and 12 deletions

View File

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

View File

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

View File

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

View File

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

View File

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