Skip to content

Commit

Permalink
Allow exporting workflows when tool is uninstalled
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Sep 5, 2017
1 parent 40c9ca5 commit 2af10c7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/galaxy/managers/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,9 +568,6 @@ def _workflow_to_dict_export(self, trans, stored=None, workflow=None):
module = module_factory.from_workflow_step(trans, step)
if not module:
return None
if module.type == 'tool' and not module.tool:
msg = "Cannot download workflow because the tool '%s' is missing in step %s." % (step.tool_id, step.order_index)
raise exceptions.ToolMissingException(msg)
# Get user annotation.
annotation_str = self.get_item_annotation_str(trans.sa_session, trans.user, step) or ''
content_id = module.get_content_id()
Expand Down Expand Up @@ -669,10 +666,12 @@ def callback(input, prefixed_name, **kwargs):
data_input_names[prefixed_name] = True
# FIXME: this updates modules silently right now; messages from updates should be provided.
module.check_and_update_state()
visit_input_values(module.tool.inputs, module.state.inputs, callback)
# Filter
# FIXME: this removes connection without displaying a message currently!
input_connections = [conn for conn in input_connections if (conn.input_name in data_input_names or conn.non_data_connection)]
if module.tool:
# If the tool is installed we attampt to verify input values
# and connections, otherwise the last known state will be dumped without modifications.
visit_input_values(module.tool.inputs, module.state.inputs, callback)
# FIXME: this removes connection without displaying a message currently!
input_connections = [conn for conn in input_connections if (conn.input_name in data_input_names or conn.non_data_connection)]

# Encode input connections as dictionary
input_conn_dict = {}
Expand Down

0 comments on commit 2af10c7

Please sign in to comment.