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

Workflow.py: fix a confusion between list/tuple of variable value to make...

Workflow.py: fix a confusion between list/tuple of variable value to make _executeMetaTrasition work.
parent fe9ccba3
......@@ -1003,13 +1003,13 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
raise WorkflowException, ('Destination state undefined: ' + new_state_id)
# Update variables.
state_values = self.contentValues(portal_type='Variable')
state_values = self.getVariableValueList()
if state_values is None:
state_values = {}
tdef_exprs = {}
status = {}
for id, vdef in self.getVariableValueList():
for id, vdef in self.getVariableValueList().items():
if not vdef.for_status:
continue
expr = None
......@@ -1022,7 +1022,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
value = former_status[id]
else:
if vdef.default_expr is not None:
expr = vdef.default_expr
expr = Expression(vdef.default_expr)
else:
value = vdef.default_value
if expr is not 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