Skip to content

Commit

Permalink
Add UnionOptions to DjangoUnionTypeOptions inheritance list
Browse files Browse the repository at this point in the history
this change makes things more consistent and prevent possible issues with 3rd party libraries
  • Loading branch information
that-one-arab committed Nov 10, 2024
1 parent a5f0598 commit 2512df3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphene_django/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import graphene
from graphene.relay import Connection, Node
from graphene.types.objecttype import ObjectType, ObjectTypeOptions
from graphene.types.union import Union
from graphene.types.union import Union, UnionOptions
from graphene.types.utils import yank_fields_from_attrs

from .converter import convert_django_field_with_choices
Expand Down Expand Up @@ -294,7 +294,7 @@ def get_node(cls, info, id):
return None


class DjangoUnionTypeOptions(ObjectTypeOptions):
class DjangoUnionTypeOptions(UnionOptions, ObjectTypeOptions):
model = None # type: Type[Model]
registry = None # type: Registry
connection = None # type: Type[Connection]
Expand Down

0 comments on commit 2512df3

Please sign in to comment.