equal
deleted
inserted
replaced
216 self.update_if_necessary(entity, attrs) |
216 self.update_if_necessary(entity, attrs) |
217 self.process_relations(entity, rels) |
217 self.process_relations(entity, rels) |
218 return entity |
218 return entity |
219 |
219 |
220 def process_relations(self, entity, rels): |
220 def process_relations(self, entity, rels): |
221 etype = entity.__regid__ |
221 etype = entity.cw_etype |
222 for (rtype, role, action), rules in self.source.mapping.get(etype, {}).iteritems(): |
222 for (rtype, role, action), rules in self.source.mapping.get(etype, {}).iteritems(): |
223 try: |
223 try: |
224 related_items = rels[role][rtype] |
224 related_items = rels[role][rtype] |
225 except KeyError: |
225 except KeyError: |
226 self.import_log.record_error('relation %s-%s not found in xml export of %s' |
226 self.import_log.record_error('relation %s-%s not found in xml export of %s' |