server/sources/native.py
branchstable
changeset 5075 a4b735e76c66
parent 5074 bc481dab93d4
child 5076 b0e6134b4324
equal deleted inserted replaced
5074:bc481dab93d4 5075:a4b735e76c66
   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