Commit 50dd666d authored by iv's avatar iv

ERP5Workflow: don't crash if worklist has not action_box_url set

parent b5902e8c
...@@ -1286,9 +1286,11 @@ def generateActionList(worklist_metadata, worklist_result, portal_url): ...@@ -1286,9 +1286,11 @@ def generateActionList(worklist_metadata, worklist_result, portal_url):
if document_count: if document_count:
format_data = metadata['format_data'] format_data = metadata['format_data']
format_data._push({'count': document_count}) format_data._push({'count': document_count})
append({'name': metadata['worklist_title'] % format_data, append({'name': metadata['worklist_title'] % format_data,
'url': '%s/%s' % (portal_url, metadata['action_box_url'] % \ 'url': portal_url if not metadata['action_box_url'] else \
format_data), '%s/%s' % (portal_url,
metadata['action_box_url'] % format_data),
'worklist_id': metadata['worklist_id'], 'worklist_id': metadata['worklist_id'],
'workflow_title': metadata['workflow_title'], 'workflow_title': metadata['workflow_title'],
'workflow_id': metadata['workflow_id'], 'workflow_id': metadata['workflow_id'],
......
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