[hg] galaxy 3301: Workflow: deal with case where an input parame...
details: http://www.bx.psu.edu/hg/galaxy/rev/200091ad2b6d changeset: 3301:200091ad2b6d user: James Taylor <james@jamestaylor.org> date: Thu Jan 28 16:41:15 2010 -0500 description: Workflow: deal with case where an input parameter that was connected has been removed diffstat: lib/galaxy/web/controllers/workflow.py | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diffs (25 lines): diff -r 2772ab12e361 -r 200091ad2b6d lib/galaxy/web/controllers/workflow.py --- a/lib/galaxy/web/controllers/workflow.py Thu Jan 28 15:54:46 2010 -0500 +++ b/lib/galaxy/web/controllers/workflow.py Thu Jan 28 16:41:15 2010 -0500 @@ -491,8 +491,20 @@ 'form_html': module.get_config_form(), } # Connections + input_connections = step.input_connections + if step.type is None or step.type == 'tool': + # Determine full (prefixed) names of valid input datasets + data_input_names = {} + def callback( input, value, prefixed_name, prefixed_label ): + if isinstance( input, DataToolParameter ): + data_input_names[ prefixed_name ] = True + 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 ] + # Encode input connections as dictionary input_conn_dict = {} - for conn in step.input_connections: + for conn in input_connections: input_conn_dict[ conn.input_name ] = \ dict( id=conn.output_step.order_index, output_name=conn.output_name ) step_dict['input_connections'] = input_conn_dict
participants (1)
-
Greg Von Kuster