fix entity classes inheritance (repair cw.test.unittest_entity) 3.5
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 14 Sep 2009 12:28:22 +0200
branch3.5
changeset 3205 dc67e9431f34
parent 3204 0b766b8a13e1
child 3206 5a51ac97f1d3
fix entity classes inheritance (repair cw.test.unittest_entity)
cwvreg.py
--- 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)