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