Commit e2c8a92d authored by wenjie.zheng's avatar wenjie.zheng

WorkflowTool.py: during conversion, Guard's expression keep none if old guard...

WorkflowTool.py: during conversion, Guard's expression keep none if old guard didn't have expression.
parent 75fb473b
......@@ -326,7 +326,6 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
transition.setGroupList(tdef.guard.groups)
if tdef.guard.expr is not None:
transition.setExpression(tdef.guard.expr.text)
else: transition.setExpression('')
# create states (portal_type = State)
for sid in dc_workflow.states:
sdef = dc_workflow.states.get(sid)
......@@ -415,7 +414,8 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
worklist.setRoleList(qdef.guard.roles)
worklist.setPermissionList(qdef.guard.permissions)
worklist.setGroupList(qdef.guard.groups)
worklist.setExpression(qdef.guard.expr)
if qdef.guard.expr is not None:
worklist.setExpression(qdef.guard.expr.text)
else:
for tid in dc_workflow.interactions:
interaction = workflow.newContent(portal_type='Interaction', temp_object=temp)
......@@ -456,7 +456,6 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
interaction.setGroupList(tdef.guard.groups)
if tdef.guard.expr is not None:
interaction.setExpression(tdef.guard.expr.text)
else: interaction.setExpression('')
interaction.setPortalTypeFilter(tdef.portal_type_filter)
interaction.setPortalTypeGroupFilter(tdef.portal_type_group_filter)
if interaction.portal_type_filter == ():
......
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