cwvreg.py
changeset 3163 edfe43ceaa35
parent 3072 6fb42c53f6df
parent 3137 5598bec9be7f
child 3185 bd0126d17e83
--- a/cwvreg.py	Wed Sep 02 16:42:07 2009 +0200
+++ b/cwvreg.py	Thu Sep 10 08:13:22 2009 +0200
@@ -146,7 +146,12 @@
             try:
                 objects = self[btype]
                 assert len(objects) == 1, objects
-                cls = objects[0]
+                if btype == etype:
+                    cls = objects[0]
+                else:
+                    # recurse to ensure issubclass(etype_class('Child'),
+                    #                              etype_class('Parent'))
+                    cls = self.etype_class(btype)
                 break
             except ObjectNotFound:
                 pass