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

Workflow.py: fix the workflow history error message at the creation stage.

parent b425bb37
...@@ -117,6 +117,7 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject): ...@@ -117,6 +117,7 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
value = expr(ec) value = expr(ec)
else: else:
value = variable.getInitialValue(object=object) value = variable.getInitialValue(object=object)
if value is None: value = ''
status_dict[variable.getReference()] = value status_dict[variable.getReference()] = value
self._updateWorkflowHistory(document, status_dict) self._updateWorkflowHistory(document, status_dict)
...@@ -689,7 +690,7 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject): ...@@ -689,7 +690,7 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
econtext = Expression_createExprContext(sci) econtext = Expression_createExprContext(sci)
expr = Expression(expr) expr = Expression(expr)
value = expr(econtext) value = expr(econtext)
if value is None or value == 'None': value = '' if value is None: value = ''
status_dict[id_no_suffix] = value status_dict[id_no_suffix] = value
# Do not proceed in case of failure of before script # Do not proceed in case of failure of before script
......
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