mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-23 15:10:48 +03:00
Allowed kwargs to DjangoObjectType instances
This commit is contained in:
parent
ade02e57d1
commit
45df639671
|
@ -51,8 +51,9 @@ class InstanceObjectType(ObjectType):
|
||||||
class Meta:
|
class Meta:
|
||||||
abstract = True
|
abstract = True
|
||||||
|
|
||||||
def __init__(self, _root=None):
|
def __init__(self, _root=None, **kwargs):
|
||||||
super(InstanceObjectType, self).__init__(_root=_root)
|
kwargs['_root'] = _root
|
||||||
|
super(InstanceObjectType, self).__init__(**kwargs)
|
||||||
assert not self._root or isinstance(self._root, self._meta.model), (
|
assert not self._root or isinstance(self._root, self._meta.model), (
|
||||||
'{} received a non-compatible instance ({}) '
|
'{} received a non-compatible instance ({}) '
|
||||||
'when expecting {}'.format(
|
'when expecting {}'.format(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user