Merge pull request #381 from riddlesio/master

fix so partial functions can be passed to field, solves issue #316
This commit is contained in:
Syrus Akbary 2016-12-13 21:25:21 -08:00 committed by GitHub
commit 7e5285d859

View File

@ -60,7 +60,7 @@ class Field(OrderedType):
@property @property
def type(self): def type(self):
if inspect.isfunction(self._type): if inspect.isfunction(self._type) or type(self._type) is partial:
return self._type() return self._type()
return self._type return self._type