mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-09 08:00:39 +03:00
Improved format for messaging in DjangoObjectType.is_type_of
This commit is contained in:
parent
b75da9fb8a
commit
c414b3f688
|
@ -90,7 +90,9 @@ class DjangoObjectType(six.with_metaclass(DjangoObjectTypeMeta, ObjectType)):
|
||||||
if isinstance(root, cls):
|
if isinstance(root, cls):
|
||||||
return True
|
return True
|
||||||
if not is_valid_django_model(type(root)):
|
if not is_valid_django_model(type(root)):
|
||||||
raise Exception('Received incompatible instance "{}"'.format(root))
|
raise Exception((
|
||||||
|
'Received incompatible instance "{}".'
|
||||||
|
).format(root))
|
||||||
model = root._meta.model
|
model = root._meta.model
|
||||||
return model == cls._meta.model
|
return model == cls._meta.model
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user