From 9c345080dacb2bd5a126d9625b9ab3c06f8a7b21 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Fri, 3 Aug 2007 15:58:08 +0000 Subject: [PATCH] Pendant of the nesting mistake: think about appending results of each pass. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15470 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/patches/WorkflowTool.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/product/ERP5Type/patches/WorkflowTool.py b/product/ERP5Type/patches/WorkflowTool.py index a475c3bd5f..efb285afce 100644 --- a/product/ERP5Type/patches/WorkflowTool.py +++ b/product/ERP5Type/patches/WorkflowTool.py @@ -404,6 +404,7 @@ def WorkflowTool_listActions(self, info=None, object=None): security_query_cache_dict[security_cache_key] = query return query def _getWorklistActionList(): + action_list = [] acceptable_key_dict = portal_catalog.getSQLCatalog().getColumnMap() # Get a list of dict of WorklistVariableMatchDict grouped by compatible conditions worklist_list_grouped_by_condition = groupWorklistListByCondition(worklist_dict=worklist_dict, acceptable_key_dict=acceptable_key_dict) @@ -421,8 +422,9 @@ def WorkflowTool_listActions(self, info=None, object=None): LOG('WorklistGeneration', BLATHER, '%s results' % (len(catalog_brain_result), )) worklist_result_dict = sumCatalogResultByWorklist(grouped_worklist_dict=grouped_worklist_dict, catalog_result=catalog_brain_result) LOG('WorklistGeneration', BLATHER, 'Distributed into %s worklists.'% (len(worklist_result_dict), )) - action_list = generateActionList(grouped_worklist_dict=grouped_worklist_dict, worklist_result=worklist_result_dict, portal_url=portal_url) - LOG('WorklistGeneration', BLATHER, 'Creating %s actions.' % (len(action_list), )) + group_action_list = generateActionList(grouped_worklist_dict=grouped_worklist_dict, worklist_result=worklist_result_dict, portal_url=portal_url) + LOG('WorklistGeneration', BLATHER, 'Creating %s actions.' % (len(group_action_list), )) + action_list.extend(group_action_list) return action_list user = str(_getAuthenticatedUser(self)) _getWorklistActionList = CachingMethod(_getWorklistActionList, id=('_getWorklistActionList', user, portal_url), cache_factory = 'erp5_ui_short') -- 2.30.9