Skip to content

Commit

Permalink
Type return of download method
Browse files Browse the repository at this point in the history
  • Loading branch information
heisner-tillman committed Mar 3, 2024
1 parent 7d608b9 commit 8baee31
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/galaxy/webapps/galaxy/services/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
SetWorkflowMenuPayload,
SetWorkflowMenuSummary,
StoredWorkflowDetailed,
WorkflowDictEditorSummary,
WorkflowDictPreviewSummary,
WorkflowDictRunSummary,
)
from galaxy.util.tool_shed.tool_shed_registry import Registry
from galaxy.webapps.galaxy.services.base import ServiceBase
Expand Down Expand Up @@ -96,6 +99,22 @@ def download_workflow(self, trans, workflow_id, history_id, style, format, versi

if style == "format2" and format != "json-download":
return PlainTextResponse(ordered_dump(ret_dict))
elif style == "export":
return ret_dict
elif style == "editor":
return WorkflowDictEditorSummary(**ret_dict)
elif style == ("legacy" or "instance"):
return StoredWorkflowDetailed(**ret_dict)
elif style == "run":
return WorkflowDictRunSummary(**ret_dict)
elif style == "preview":
return WorkflowDictPreviewSummary(**ret_dict)
elif style == "format2":
return ret_dict
elif style == "format2_wrapped_yaml":
return ret_dict
elif style == "ga":
return ret_dict
else:
return ret_dict

Expand Down

0 comments on commit 8baee31

Please sign in to comment.