# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1236023038 -3600 # Node ID cf1caf4600815bfdebeec32dbb992d2074c48059 # Parent ba5257deec7d7998c3db500e6bf5183567f38ceb allow to pass attrs as argument explicitly diff -r ba5257deec7d -r cf1caf460081 server/sources/extlite.py --- a/server/sources/extlite.py Mon Mar 02 20:43:08 2009 +0100 +++ b/server/sources/extlite.py Mon Mar 02 20:43:58 2009 +0100 @@ -203,7 +203,7 @@ """add a new entity to the source""" raise NotImplementedError() - def local_update_entity(self, session, entity): + def local_update_entity(self, session, entity, attrs=None): """update an entity in the source This is not provided as update_entity implementation since usually @@ -211,7 +211,8 @@ and the source implementor may use this method if necessary """ cu = session.pool[self.uri] - attrs = self.sqladapter.preprocess_entity(entity) + if attrs is None: + attrs = self.sqladapter.preprocess_entity(entity) sql = self.sqladapter.sqlgen.update(str(entity.e_schema), attrs, ['eid']) cu.execute(sql, attrs)