equal
deleted
inserted
replaced
144 except KeyError: |
144 except KeyError: |
145 btype = str(baseschema) |
145 btype = str(baseschema) |
146 try: |
146 try: |
147 objects = self[btype] |
147 objects = self[btype] |
148 assert len(objects) == 1, objects |
148 assert len(objects) == 1, objects |
149 cls = objects[0] |
149 if btype == etype: |
|
150 cls = objects[0] |
|
151 else: |
|
152 # recurse to ensure issubclass(etype_class('Child'), |
|
153 # etype_class('Parent')) |
|
154 cls = self.etype_class(btype) |
150 break |
155 break |
151 except ObjectNotFound: |
156 except ObjectNotFound: |
152 pass |
157 pass |
153 else: |
158 else: |
154 # no entity class for any of the ancestors, fallback to the default |
159 # no entity class for any of the ancestors, fallback to the default |