Commit 70324182 authored by iv's avatar iv

ERP5Workflow: if status value is None, don't change it to empty string!

in the Workflow, the status dict (used to set history) can handle None
values, and the behaviour should not differ from DCWorkflow.

This should fix SyncML test failures.
parent 01646bd8
......@@ -902,7 +902,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
addable = WORKFLOW_ACTION_ADDABLE
time = status.get('time')
for action in action_list:
this_one = WORKFLOW_ACTION_ADDABLE
this_one = True
if time <= action.get('time'):
# action in the past are not appended
addable = WORKFLOW_ACTION_INSERTABLE
......@@ -910,7 +910,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
key_list.remove("time")
for key in key_list:
if status[key] != action[key]:
this_one = WORKFLOW_ACTION_NOT_ADDABLE
this_one = False
break
if this_one:
addable = WORKFLOW_ACTION_NOT_ADDABLE
......
......@@ -717,7 +717,6 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
econtext = createExprContext(sci)
expr = Expression(expr)
value = expr(econtext)
if value is None: value = ''
status_dict[variable_reference] = value
# Do not proceed in case of failure of before script
if not before_script_success:
......
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