|
@@ -17,7 +17,7 @@ __all__ = (
|
|
|
|
|
|
|
|
|
|
|
|
|
class ContactAssignmentsMixin:
|
|
class ContactAssignmentsMixin:
|
|
|
- assignments = graphene.List('tenancy.graphql.types.ContactAssignmentType')
|
|
|
|
|
|
|
+ # assignments = graphene.List('tenancy.graphql.types.ContactAssignmentType')
|
|
|
|
|
|
|
|
def resolve_assignments(self, info):
|
|
def resolve_assignments(self, info):
|
|
|
return self.assignments.restrict(info.context.user, 'view')
|
|
return self.assignments.restrict(info.context.user, 'view')
|
|
@@ -30,7 +30,7 @@ class ContactAssignmentsMixin:
|
|
|
@strawberry_django.type(
|
|
@strawberry_django.type(
|
|
|
models.Tenant,
|
|
models.Tenant,
|
|
|
fields='__all__',
|
|
fields='__all__',
|
|
|
- filters=TenantFilter
|
|
|
|
|
|
|
+ # filters=TenantFilter
|
|
|
)
|
|
)
|
|
|
class TenantType(NetBoxObjectType):
|
|
class TenantType(NetBoxObjectType):
|
|
|
pass
|
|
pass
|
|
@@ -39,7 +39,7 @@ class TenantType(NetBoxObjectType):
|
|
|
@strawberry_django.type(
|
|
@strawberry_django.type(
|
|
|
models.TenantGroup,
|
|
models.TenantGroup,
|
|
|
fields='__all__',
|
|
fields='__all__',
|
|
|
- filters=TenantGroupFilter
|
|
|
|
|
|
|
+ # filters=TenantGroupFilter
|
|
|
)
|
|
)
|
|
|
class TenantGroupType(OrganizationalObjectType):
|
|
class TenantGroupType(OrganizationalObjectType):
|
|
|
pass
|
|
pass
|
|
@@ -52,7 +52,7 @@ class TenantGroupType(OrganizationalObjectType):
|
|
|
@strawberry_django.type(
|
|
@strawberry_django.type(
|
|
|
models.Contact,
|
|
models.Contact,
|
|
|
fields='__all__',
|
|
fields='__all__',
|
|
|
- filters=ContactFilter
|
|
|
|
|
|
|
+ # filters=ContactFilter
|
|
|
)
|
|
)
|
|
|
class ContactType(ContactAssignmentsMixin, NetBoxObjectType):
|
|
class ContactType(ContactAssignmentsMixin, NetBoxObjectType):
|
|
|
pass
|
|
pass
|
|
@@ -61,7 +61,7 @@ class ContactType(ContactAssignmentsMixin, NetBoxObjectType):
|
|
|
@strawberry_django.type(
|
|
@strawberry_django.type(
|
|
|
models.ContactRole,
|
|
models.ContactRole,
|
|
|
fields='__all__',
|
|
fields='__all__',
|
|
|
- filters=ContactRoleFilter
|
|
|
|
|
|
|
+ # filters=ContactRoleFilter
|
|
|
)
|
|
)
|
|
|
class ContactRoleType(ContactAssignmentsMixin, OrganizationalObjectType):
|
|
class ContactRoleType(ContactAssignmentsMixin, OrganizationalObjectType):
|
|
|
pass
|
|
pass
|
|
@@ -70,7 +70,7 @@ class ContactRoleType(ContactAssignmentsMixin, OrganizationalObjectType):
|
|
|
@strawberry_django.type(
|
|
@strawberry_django.type(
|
|
|
models.ContactGroup,
|
|
models.ContactGroup,
|
|
|
fields='__all__',
|
|
fields='__all__',
|
|
|
- filters=ContactGroupFilter
|
|
|
|
|
|
|
+ # filters=ContactGroupFilter
|
|
|
)
|
|
)
|
|
|
class ContactGroupType(OrganizationalObjectType):
|
|
class ContactGroupType(OrganizationalObjectType):
|
|
|
pass
|
|
pass
|
|
@@ -79,7 +79,7 @@ class ContactGroupType(OrganizationalObjectType):
|
|
|
@strawberry_django.type(
|
|
@strawberry_django.type(
|
|
|
models.ContactAssignment,
|
|
models.ContactAssignment,
|
|
|
fields='__all__',
|
|
fields='__all__',
|
|
|
- filters=ContactAssignmentFilter
|
|
|
|
|
|
|
+ # filters=ContactAssignmentFilter
|
|
|
)
|
|
)
|
|
|
class ContactAssignmentType(CustomFieldsMixin, TagsMixin, BaseObjectType):
|
|
class ContactAssignmentType(CustomFieldsMixin, TagsMixin, BaseObjectType):
|
|
|
pass
|
|
pass
|