mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-16 07:02:04 +03:00
Don't unwrap lazy user, instead check its class.
This commit is contained in:
parent
b9f0e4f9ae
commit
7b96114202
|
@ -268,12 +268,9 @@ class DjangoObjectType(ObjectType):
|
|||
|
||||
@classmethod
|
||||
def is_type_of(cls, root, info):
|
||||
if isinstance(root, SimpleLazyObject):
|
||||
root._setup()
|
||||
root = root._wrapped
|
||||
if isinstance(root, cls):
|
||||
return True
|
||||
if not is_valid_django_model(type(root)):
|
||||
if not is_valid_django_model(type(root.__class__)):
|
||||
raise Exception(('Received incompatible instance "{}".').format(root))
|
||||
|
||||
if cls._meta.model._meta.proxy:
|
||||
|
|
Loading…
Reference in New Issue
Block a user