mirror of
https://github.com/graphql-python/graphene.git
synced 2025-07-27 08:19:45 +03:00
added partial check for Dynamic type
This commit is contained in:
parent
12d4dab774
commit
b1dbcedd6b
|
@ -1,4 +1,5 @@
|
|||
import inspect
|
||||
from functools import partial
|
||||
|
||||
from .mountedtype import MountedType
|
||||
|
||||
|
@ -11,7 +12,7 @@ class Dynamic(MountedType):
|
|||
|
||||
def __init__(self, type, with_schema=False, _creation_counter=None):
|
||||
super(Dynamic, self).__init__(_creation_counter=_creation_counter)
|
||||
assert inspect.isfunction(type)
|
||||
assert inspect.isfunction(type) or isinstance(type, partial)
|
||||
self.type = type
|
||||
self.with_schema = with_schema
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user