Correct device/VM component GraphQL type definitions

This commit is contained in:
Jeremy Stretch
2025-10-22 12:03:47 -04:00
parent 2f23bdcebb
commit 2477579620
2 changed files with 4 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ from netbox.graphql.scalars import BigInt
from netbox.graphql.types import (
BaseObjectType, NestedGroupObjectType, NetBoxObjectType, OrganizationalObjectType, PrimaryObjectType,
)
from users.graphql.mixins import OwnerMixin
from .filters import *
from .mixins import CabledObjectMixin, PathEndpointMixin
@@ -87,7 +88,7 @@ __all__ = (
@strawberry.type
class ComponentType(NetBoxObjectType):
class ComponentType(OwnerMixin, NetBoxObjectType):
"""
Base type for device/VM components
"""

View File

@@ -7,6 +7,7 @@ from extras.graphql.mixins import ConfigContextMixin, ContactsMixin
from ipam.graphql.mixins import IPAddressesMixin, VLANGroupsMixin
from netbox.graphql.scalars import BigInt
from netbox.graphql.types import OrganizationalObjectType, PrimaryObjectType, NetBoxObjectType
from users.graphql.mixins import OwnerMixin
from virtualization import models
from .filters import *
@@ -36,7 +37,7 @@ __all__ = (
@strawberry.type
class ComponentType(NetBoxObjectType):
class ComponentType(OwnerMixin, NetBoxObjectType):
"""
Base type for device/VM components
"""