From f7c660572ea1b629f6d98b1a253f6fb93cf9b6d2 Mon Sep 17 00:00:00 2001 From: Arthur Date: Wed, 5 Oct 2022 15:15:14 -0700 Subject: [PATCH] 9478 fix tests --- netbox/utilities/testing/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netbox/utilities/testing/api.py b/netbox/utilities/testing/api.py index f75fb1efd..fab0e4db5 100644 --- a/netbox/utilities/testing/api.py +++ b/netbox/utilities/testing/api.py @@ -1,3 +1,4 @@ +import inspect import json from django.conf import settings @@ -449,7 +450,7 @@ class APIViewTestCases: if type(field) is GQLDynamic: # Dynamic fields must specify a subselection fields_string += f'{field_name} {{ id }}\n' - elif type(field.type) is GQLList and issubclass(field.type.of_type, GQLUnion): + elif type(field.type) is GQLList and inspect.isclass(field.type.of_type) and issubclass(field.type.of_type, GQLUnion): continue elif type(field.type) is GQLList and field_name != 'choices': # TODO: Come up with something more elegant