From 24646741ea1f66bea0ced4ea8cf99c61a9de2517 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Wed, 14 Feb 2007 17:13:33 +0000 Subject: [PATCH] Add a dummy argument to catalogObjectList so that activities passing idxs don't fail. This will solve problems in many unit tests failing since parameters are transmited to function when executed on a group of objects. Add a log if a value was passed to warn that the value is not taken into account, and to make explicit that the parameter is just a dummy. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12709 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ZSQLCatalog/SQLCatalog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/product/ZSQLCatalog/SQLCatalog.py b/product/ZSQLCatalog/SQLCatalog.py index 3ff33c4581..83a24cfb36 100644 --- a/product/ZSQLCatalog/SQLCatalog.py +++ b/product/ZSQLCatalog/SQLCatalog.py @@ -1265,7 +1265,7 @@ class Catalog( Folder, self.catalogObjectList([object]) def catalogObjectList(self, object_list, method_id_list=None, disable_cache=0, - check_uid=1): + check_uid=1, idxs=None): """ Add objects to the Catalog by calling all SQL methods and providing needed arguments. @@ -1288,6 +1288,9 @@ class Catalog( Folder, LOG('SQLCatalog', TRACE, 'catalogging %d objects' % len(object_list)) #LOG('catalogObjectList', 0, 'called with %r' % (object_list,)) + if idxs not in (None, []): + LOG('ZSLQCatalog.SQLCatalog:catalogObjectList', 0, 'Warning: idxs is ignored in this function and is only provided to be compatible with CMFCatalogAware.reindexObject.') + if not self.isIndexable(): return None -- 2.30.9