sobjects/cwxmlparser.py
changeset 8900 010a59e12d89
parent 8748 f5027f8d2478
child 9474 dd96b877879d
equal deleted inserted replaced
8899:c7a95ebcc093 8900:010a59e12d89
   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'