Commit c11f9383 authored by iv's avatar iv

ERP5Workflow: set state_permission_roles to an empty dict instead of None

during workflow conversion, when original workflow permission_roles is
None
parent 5fadcff6
......@@ -370,10 +370,10 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
state.setTitle(sdef.title)
state.setReference(sdef.id)
state.setDescription(sdef.description)
permission_roles = sdef.permission_roles
permission_roles = sdef.permission_roles or {}
state.setStatePermissionRoles(permission_roles)
if sdef.permission_roles is not None:
state.setCellRange(sorted(sdef.permission_roles.keys()),
if permission_roles:
state.setCellRange(sorted(permission_roles.keys()),
sorted(workflow.getManagedRoleList()),
base_id='cell')
......
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