mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-22 06:30:52 +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:
|
||||
abstract = True
|
||||
|
||||
def __init__(self, _root=None):
|
||||
super(InstanceObjectType, self).__init__(_root=_root)
|
||||
def __init__(self, _root=None, **kwargs):
|
||||
kwargs['_root'] = _root
|
||||
super(InstanceObjectType, self).__init__(**kwargs)
|
||||
assert not self._root or isinstance(self._root, self._meta.model), (
|
||||
'{} received a non-compatible instance ({}) '
|
||||
'when expecting {}'.format(
|
||||
|
|
Loading…
Reference in New Issue
Block a user