Commit 24e9e509 authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

Workflow.py: get variable by reference for new workflow.

parent 4027129d
...@@ -456,7 +456,10 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -456,7 +456,10 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
if name == state_var: if name == state_var:
return ob._getDefaultAcquiredValue(state_var).getId() return ob._getDefaultAcquiredValue(state_var).getId()
vdef = self._getOb(name) for x in self.objectValues(portal_type='Variable'):
if x.getReference() == name:
vdef = x
break
status_dict = self.getCurrentStatusDict(ob) status_dict = self.getCurrentStatusDict(ob)
former_status = self._getOb(status_dict[state_var], None) former_status = self._getOb(status_dict[state_var], None)
......
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