cwvreg.py
branch3.5
changeset 3205 dc67e9431f34
parent 3184 613064b49331
child 3230 1d25e928c299
child 3240 8604a15995d1
--- a/cwvreg.py	Mon Sep 14 12:17:31 2009 +0200
+++ b/cwvreg.py	Mon Sep 14 12:28:22 2009 +0200
@@ -140,9 +140,12 @@
                 try:
                     objects = self[btype]
                     assert len(objects) == 1, objects
-                    cls = objects[0]
+                    if btype == etype:
+                        cls = objects[0]
+                    else:
+                        cls = self.etype_class(btype)
                 except ObjectNotFound:
-                    pass
+                    continue
             else:
                 # ensure parent classes are built first
                 self.etype_class(btype)