From 4112af534daf107a22e0dfd6dc0b1c80361687a3 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Date: Thu, 24 Oct 2024 08:39:12 -0700 Subject: [PATCH] 7699 fix graphql tests for clusters reference --- netbox/dcim/graphql/types.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/netbox/dcim/graphql/types.py b/netbox/dcim/graphql/types.py index cd863837a..bbfadbfd0 100644 --- a/netbox/dcim/graphql/types.py +++ b/netbox/dcim/graphql/types.py @@ -726,9 +726,12 @@ class SiteType(VLANGroupsMixin, ImageAttachmentsMixin, ContactsMixin, NetBoxObje locations: List[Annotated["LocationType", strawberry.lazy('dcim.graphql.types')]] asns: List[Annotated["ASNType", strawberry.lazy('ipam.graphql.types')]] circuit_terminations: List[Annotated["CircuitTerminationType", strawberry.lazy('circuits.graphql.types')]] - clusters: List[Annotated["ClusterType", strawberry.lazy('virtualization.graphql.types')]] vlans: List[Annotated["VLANType", strawberry.lazy('ipam.graphql.types')]] + @strawberry_django.field + def clusters(self) -> List[Annotated["ClusterType", strawberry.lazy('virtualization.graphql.types')]]: + return self._clusters.all() + @strawberry_django.type( models.SiteGroup,