From 19e5df51d8dfc6cd55fc0056f809be76f1dbbeee Mon Sep 17 00:00:00 2001 From: Christophe de Vienne Date: Tue, 8 Nov 2011 13:03:34 +0100 Subject: [PATCH] Fix registering of class inheriting from an already registerd class --- wsme/types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wsme/types.py b/wsme/types.py index 35bdf3f..cfb1feb 100644 --- a/wsme/types.py +++ b/wsme/types.py @@ -84,7 +84,8 @@ Unset = UnsetType() def iscomplex(datatype): - return hasattr(datatype, '_wsme_attributes') + return inspect.isclass(datatype) \ + and '_wsme_attributes' in datatype.__dict__ def isarray(datatype):