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(
models.DataFile,
# fields='__all__',
exclude=('data',), # bug - temp
exclude=('data',),
filters=DataFileFilter
)
class DataFileType(BaseObjectType):

View File

@ -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):

View File

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

View File

@ -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]:

View File

@ -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')]]: