mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-26 03:23:55 +03:00
Fixed tests.
This commit is contained in:
parent
aa86c27ea2
commit
b72684192f
|
@ -8,6 +8,9 @@ from .structures import NonNull
|
|||
from .unmountedtype import UnmountedType
|
||||
|
||||
|
||||
base_type = type
|
||||
|
||||
|
||||
def source_resolver(source, root, args, context, info):
|
||||
resolved = getattr(root, source, None)
|
||||
if inspect.isfunction(resolved):
|
||||
|
@ -30,7 +33,7 @@ class Field(OrderedType):
|
|||
)
|
||||
assert not callable(default_value), (
|
||||
'The default value can not be a function but received "{}".'
|
||||
).format(type(default_value))
|
||||
).format(base_type(default_value))
|
||||
|
||||
if required:
|
||||
type = NonNull(type)
|
||||
|
|
Loading…
Reference in New Issue
Block a user