Commit 1a2fd0fe authored by Arnaud Fontaine's avatar Arnaud Fontaine

WWIP: Variable/Guard.

parent 35c36090
...@@ -67,7 +67,7 @@ class WorkflowVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject, ...@@ -67,7 +67,7 @@ class WorkflowVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject,
) )
def _setVariableExpression(self, expression): def _setVariableExpression(self, expression):
if isinstance(expression, str) and expression != '': if isinstance(expression, basestring) and expression:
self.setVariableExpressionText(expression) self.setVariableExpressionText(expression)
elif isinstance(expression, Expression) and expression.text: elif isinstance(expression, Expression) and expression.text:
self.variable_expression = expression self.variable_expression = expression
......
...@@ -96,6 +96,7 @@ class GuardableMixin(object): ...@@ -96,6 +96,7 @@ class GuardableMixin(object):
return False return False
return True return True
# Same as WorkflowVariable.variable_expression
def _setGuardExpression(self, text): def _setGuardExpression(self, text):
if text: if text:
self.guard_expression = Expression(text) self.guard_expression = Expression(text)
......
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