Fixed an issue with creating new chars following the latest optimizations.

This commit is contained in:
Griatch 2012-02-26 19:04:57 +01:00
parent 018a98b92c
commit 42254fa3c4

View file

@ -40,7 +40,7 @@ def returns_typeclass_list(method):
def func(self, *args, **kwargs):
"decorator. Returns a list."
matches = method(self, *args, **kwargs)
return [dbobj.typeclass or dbobj for dbobj in make_iter(matches)]
return [(hasattr(dbobj, "typeclass") and dbobj.typeclass) or dbobj for dbobj in make_iter(matches)]
return func
def returns_typeclass(method):