Commit 7585cf1c authored by iv's avatar iv

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

parent 700d94ce
......@@ -1286,9 +1286,11 @@ def generateActionList(worklist_metadata, worklist_result, portal_url):
if document_count:
format_data = metadata['format_data']
format_data._push({'count': document_count})
append({'name': metadata['worklist_title'] % format_data,
'url': '%s/%s' % (portal_url, metadata['action_box_url'] % \
format_data),
'url': portal_url if not metadata['action_box_url'] else \
  • How was it working with DCWorkflow ? May be there was some filtering before this code was called.

Please register or sign in to reply
  • Maintainer

    metadata['action_box_url'] value was 'None' (the type was string) in DCWorkflow, whereas None (the type is NoneType) in ERP5Workflow, due to use of getActboxUrl() method in ERP5 Workflow and direct access to action_box_url value in DC Workflow.

Please register or sign in to reply
'%s/%s' % (portal_url,
metadata['action_box_url'] % format_data),
'worklist_id': metadata['worklist_id'],
'workflow_title': metadata['workflow_title'],
'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