Adjust export for backward compatibility

This commit is contained in:
guerler
2017-02-01 17:48:35 -05:00
parent 417d119df9
commit ee6063ec5b
+4 -4
View File
@@ -563,10 +563,10 @@ class WorkflowContentsManager(UsesAnnotations):
annotation_str = step_annotation.annotation
content_id = module.get_content_id()
# Export differences for backward compatibility
if module.type != 'tool':
tool_state = json.dumps( module.state.inputs )
else:
if module.type == 'tool':
tool_state = module.get_state()
else:
tool_state = module.state.inputs
# Step info
step_dict = {
'id': step.order_index,
@@ -576,7 +576,7 @@ class WorkflowContentsManager(UsesAnnotations):
# eliminate after a few years...
'tool_version': step.tool_version,
'name': module.get_name(),
'tool_state': tool_state,
'tool_state': json.dumps( tool_state ),
'errors': module.get_errors(),
'uuid': str(step.uuid),
'label': step.label or None,