[Erp5-report] r12709 - /erp5/trunk/products/ZSQLCatalog/SQLCatalog.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Feb 14 18:13:34 CET 2007


Author: vincent
Date: Wed Feb 14 18:13:33 2007
New Revision: 12709

URL: http://svn.erp5.org?rev=12709&view=rev
Log:
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.

Modified:
    erp5/trunk/products/ZSQLCatalog/SQLCatalog.py

Modified: erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/SQLCatalog.py?rev=12709&r1=12708&r2=12709&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/SQLCatalog.py (original)
+++ erp5/trunk/products/ZSQLCatalog/SQLCatalog.py Wed Feb 14 18:13:33 2007
@@ -1265,7 +1265,7 @@
     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.
@@ -1287,6 +1287,9 @@
     """
     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




More information about the Erp5-report mailing list