diff -r a4e97a31cc11 -r 7b7d5a5d6365 server/sources/__init__.py --- a/server/sources/__init__.py Tue Apr 01 16:35:15 2014 +0200 +++ b/server/sources/__init__.py Tue Apr 01 16:48:14 2014 +0200 @@ -292,7 +292,7 @@ return wsupport return True - def before_entity_insertion(self, session, lid, etype, eid, sourceparams): + def before_entity_insertion(self, cnx, lid, etype, eid, sourceparams): """called by the repository when an eid has been attributed for an entity stored here but the entity has not been inserted in the system table yet. @@ -300,12 +300,12 @@ This method must return the an Entity instance representation of this entity. """ - entity = self.repo.vreg['etypes'].etype_class(etype)(session) + entity = self.repo.vreg['etypes'].etype_class(etype)(cnx) entity.eid = eid entity.cw_edited = EditedEntity(entity) return entity - def after_entity_insertion(self, session, lid, entity, sourceparams): + def after_entity_insertion(self, cnx, lid, entity, sourceparams): """called by the repository after an entity stored here has been inserted in the system table. """