1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Expose BaseObjectType and NetBoxObjectType for plugins

This commit is contained in:
jeremystretch
2022-02-04 15:07:35 -05:00
parent 03ea257711
commit dae5c94be0
8 changed files with 59 additions and 40 deletions

View File

@@ -1,7 +1,7 @@
import graphene
from tenancy import filtersets, models
from netbox.graphql.types import BaseObjectType, OrganizationalObjectType, PrimaryObjectType
from netbox.graphql.types import BaseObjectType, OrganizationalObjectType, NetBoxObjectType
__all__ = (
'ContactAssignmentType',
@@ -24,7 +24,7 @@ class ContactAssignmentsMixin:
# Tenants
#
class TenantType(PrimaryObjectType):
class TenantType(NetBoxObjectType):
class Meta:
model = models.Tenant
@@ -44,7 +44,7 @@ class TenantGroupType(OrganizationalObjectType):
# Contacts
#
class ContactType(ContactAssignmentsMixin, PrimaryObjectType):
class ContactType(ContactAssignmentsMixin, NetBoxObjectType):
class Meta:
model = models.Contact