cwvreg.py
branch3.5
changeset 3137 5598bec9be7f
parent 3071 6ad4e6d4df86
child 3163 edfe43ceaa35
child 3316 c4c07aab1c39
--- a/cwvreg.py	Wed Sep 09 15:07:58 2009 +0200
+++ b/cwvreg.py	Wed Sep 09 15:12:23 2009 +0200
@@ -138,7 +138,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