Check if 'descendants' list has values
@@ -466,6 +466,7 @@ class Translator(object):
else:
descendants = [d.__name__ for d in self._registry.keys()
if issubclass(d, model) and d != model]
+ if descendants:
raise DescendantRegistered(
'Model "%s" cannot be registered after its subclass'
' "%s"' % (model.__name__, descendants[0]))
