equal
deleted
inserted
replaced
918 elif isinstance(value, str): |
918 elif isinstance(value, str): |
919 entity[rtype] = unicode(value, session.encoding, 'replace') |
919 entity[rtype] = unicode(value, session.encoding, 'replace') |
920 else: |
920 else: |
921 entity[rtype] = value |
921 entity[rtype] = value |
922 entity.set_eid(eid) |
922 entity.set_eid(eid) |
|
923 session.repo.init_entity_caches(session, entity, self) |
923 entity.edited_attributes = set(entity) |
924 entity.edited_attributes = set(entity) |
924 entity.check() |
925 entity.check() |
925 self.repo.hm.call_hooks('before_add_entity', session, entity=entity) |
926 self.repo.hm.call_hooks('before_add_entity', session, entity=entity) |
926 # restore the entity |
927 # restore the entity |
927 action.changes['cw_eid'] = eid |
928 action.changes['cw_eid'] = eid |