Commit 47a6f5e3 authored by iv's avatar iv

ERP5Workflow: rename variables

parent b6724253
......@@ -329,15 +329,15 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
moved_exc = None
while 1:
try:
sdef = self._executeTransition(document, tdef, kwargs)
state = self._executeTransition(document, tdef, kwargs)
except ObjectMoved, moved_exc:
document = moved_exc.getNewObject()
sdef = self._getWorkflowStateOf(document, id_only=0)
state = self._getWorkflowStateOf(document, id_only=0)
# Re-raise after all transitions.
if sdef is None:
if state is None:
break
tdef = self._findAutomaticTransition(document, sdef)
if tdef is None:
transition = self._findAutomaticTransition(document, state)
if transition is None:
# No more automatic transitions.
break
# Else continue.
......@@ -689,7 +689,6 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
object.REQUEST.other.update(form_kw)
kwargs = form_kw
# XXX(WORKFLOW) check this for loop
for vdef in self.objectValues(portal_type='Workflow Variable'):
id = vdef.getId()
variable_reference = vdef.getReference()
......@@ -709,7 +708,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
expr = variable_expression
else:
value = vdef.getVariableValue(object=object)
if expr is not None and expr != '':
if expr not in(None, ''):
# Evaluate an expression.
if econtext is None:
# Lazily create the expression context.
......
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