equal
deleted
inserted
replaced
136 except KeyError: |
136 except KeyError: |
137 btype = str(baseschema) |
137 btype = str(baseschema) |
138 try: |
138 try: |
139 objects = self[btype] |
139 objects = self[btype] |
140 assert len(objects) == 1, objects |
140 assert len(objects) == 1, objects |
141 cls = objects[0] |
141 if btype == etype: |
|
142 cls = objects[0] |
|
143 else: |
|
144 # recurse to ensure issubclass(etype_class('Child'), |
|
145 # etype_class('Parent')) |
|
146 cls = self.etype_class(btype) |
142 break |
147 break |
143 except ObjectNotFound: |
148 except ObjectNotFound: |
144 pass |
149 pass |
145 else: |
150 else: |
146 # no entity class for any of the ancestors, fallback to the default |
151 # no entity class for any of the ancestors, fallback to the default |