add edited_attributes to entities from external sources stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 06 Oct 2009 17:13:27 +0200
branchstable
changeset 3567 c43ce7949acf
parent 3566 521337e71fbb
child 3568 87a7ca9d8ce6
add edited_attributes to entities from external sources
server/repository.py
--- a/server/repository.py	Tue Oct 06 17:13:08 2009 +0200
+++ b/server/repository.py	Tue Oct 06 17:13:27 2009 +0200
@@ -882,6 +882,8 @@
             self._extid_cache[cachekey] = eid
             self._type_source_cache[eid] = (etype, source.uri, extid)
             entity = source.before_entity_insertion(session, extid, etype, eid)
+            if not hasattr(entity, 'edited_attributes'):
+                entity.edited_attributes = set()
             if source.should_call_hooks:
                 self.hm.call_hooks('before_add_entity', etype, session, entity)
             # XXX call add_info with complete=False ?