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

Workflow.py: correct the guard's attributes list format to tuple.

parent bbad5dbf
...@@ -827,6 +827,8 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject): ...@@ -827,6 +827,8 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
property_value = tdef.getExpression() property_value = tdef.getExpression()
if property_value is None or property_value == []: if property_value is None or property_value == []:
property_value = '' property_value = ''
else:
property_value = tuple(property_value)
sub_object = SubElement(guard, property_id, attrib=dict(type='guard configuration')) sub_object = SubElement(guard, property_id, attrib=dict(type='guard configuration'))
else: else:
if property_id == 'new_state_id': if property_id == 'new_state_id':
...@@ -912,6 +914,8 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject): ...@@ -912,6 +914,8 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
property_value = qdef.getPermissionList() property_value = qdef.getPermissionList()
if property_id == 'expr': if property_id == 'expr':
property_value = qdef.getExpression() property_value = qdef.getExpression()
if property_value is not None:
property_value = tuple(property_value)
sub_object = SubElement(guard, property_id, attrib=dict(type='guard configuration')) sub_object = SubElement(guard, property_id, attrib=dict(type='guard configuration'))
else: else:
property_value = qdef.getProperty(property_id) property_value = qdef.getProperty(property_id)
......
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