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

WorkflowTool.py: avoid convert 'non-exist' bad defined transition during the conversion.

parent 834e7010
......@@ -350,8 +350,9 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
sdef = workflow._getOb('state_'+sid)
new_category = []
for transition_id in dc_workflow.states.get(sid).transitions:
tr_path = getattr(workflow, 'transition_'+transition_id).getPath()
tr_path = 'destination/' + '/'.join(tr_path.split('/')[2:])
tr = getattr(workflow, 'transition_'+transition_id, None)
if tr is not None:
tr_path = 'destination/' + '/'.join(tr.getPath().split('/')[2:])
new_category.append(tr_path)
sdef.setCategoryList(new_category)
# set transition's destination state:
......
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