Commit e00cc9dd authored by Vincent Pelletier's avatar Vincent Pelletier

Move search_result computation out of the "for" loop.

Remove commented-out useless log.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17363 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f36c3dfa
...@@ -446,6 +446,7 @@ def WorkflowTool_listActions(self, info=None, object=None): ...@@ -446,6 +446,7 @@ def WorkflowTool_listActions(self, info=None, object=None):
if len(worklist_dict): if len(worklist_dict):
portal_url = getToolByName(self, 'portal_url')() portal_url = getToolByName(self, 'portal_url')()
portal_catalog = getToolByName(self, 'portal_catalog') portal_catalog = getToolByName(self, 'portal_catalog')
search_result = portal_catalog.unrestrictedSearchResults
getSecurityUidListAndRoleColumnDict = \ getSecurityUidListAndRoleColumnDict = \
portal_catalog.getSecurityUidListAndRoleColumnDict portal_catalog.getSecurityUidListAndRoleColumnDict
security_query_cache_dict = {} security_query_cache_dict = {}
...@@ -460,12 +461,10 @@ def WorkflowTool_listActions(self, info=None, object=None): ...@@ -460,12 +461,10 @@ def WorkflowTool_listActions(self, info=None, object=None):
acceptable_key_dict=acceptable_key_dict, acceptable_key_dict=acceptable_key_dict,
getSecurityUidListAndRoleColumnDict=\ getSecurityUidListAndRoleColumnDict=\
getSecurityUidListAndRoleColumnDict) getSecurityUidListAndRoleColumnDict)
#LOG('WorklistGeneration', WARNING, worklist_list_grouped_by_condition)
for grouped_worklist_dict in worklist_list_grouped_by_condition: for grouped_worklist_dict in worklist_list_grouped_by_condition:
# Generate the query for this worklist_list # Generate the query for this worklist_list
(select_expression, group_by_expression, query) = \ (select_expression, group_by_expression, query) = \
getWorklistListQuery(grouped_worklist_dict=grouped_worklist_dict) getWorklistListQuery(grouped_worklist_dict=grouped_worklist_dict)
search_result = portal_catalog.unrestrictedSearchResults
search_result_kw = {'select_expression': select_expression, search_result_kw = {'select_expression': select_expression,
'group_by_expression': group_by_expression, 'group_by_expression': group_by_expression,
'query': query} 'query': query}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment