server/repository.py
branchstable
changeset 3567 c43ce7949acf
parent 3539 f3b14d052798
child 3584 585c4423a54c
equal deleted inserted replaced
3566:521337e71fbb 3567:c43ce7949acf
   880         try:
   880         try:
   881             eid = self.system_source.create_eid(session)
   881             eid = self.system_source.create_eid(session)
   882             self._extid_cache[cachekey] = eid
   882             self._extid_cache[cachekey] = eid
   883             self._type_source_cache[eid] = (etype, source.uri, extid)
   883             self._type_source_cache[eid] = (etype, source.uri, extid)
   884             entity = source.before_entity_insertion(session, extid, etype, eid)
   884             entity = source.before_entity_insertion(session, extid, etype, eid)
       
   885             if not hasattr(entity, 'edited_attributes'):
       
   886                 entity.edited_attributes = set()
   885             if source.should_call_hooks:
   887             if source.should_call_hooks:
   886                 self.hm.call_hooks('before_add_entity', etype, session, entity)
   888                 self.hm.call_hooks('before_add_entity', etype, session, entity)
   887             # XXX call add_info with complete=False ?
   889             # XXX call add_info with complete=False ?
   888             self.add_info(session, entity, source, extid)
   890             self.add_info(session, entity, source, extid)
   889             source.after_entity_insertion(session, extid, entity)
   891             source.after_entity_insertion(session, extid, entity)