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

Workflow.py: avoid the showAsXML error when not initial state is definded.

parent 12621328
......@@ -758,7 +758,10 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
prop_type = self.getPropertyType('workflow_managed_permission_list')
sub_object = SubElement(workflow, prop_id, attrib=dict(type=prop_type))
elif prop_id == 'initial_state':
value = self.getSourceValue().getReference()
if self.getSourceValue() is not None:
value = self.getSourceValue().getReference()
else:
value = ''
sub_object = SubElement(workflow, prop_id, attrib=dict(type='string'))
elif prop_id =='state_var':
value = self.getProperty('state_variable')
......
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