Fixed ClassTypes when returned as instance. Fixed #105

This commit is contained in:
Syrus Akbary 2016-02-04 13:47:03 -08:00
parent eb9286cf6a
commit 7b06e01cb3

View File

@ -52,6 +52,8 @@ class Schema(object):
def T(self, _type):
if not _type:
return
if isinstance(_type, ClassType):
_type = type(_type)
is_classtype = inspect.isclass(_type) and issubclass(_type, ClassType)
is_instancetype = isinstance(_type, InstanceType)
if is_classtype or is_instancetype: