commit/galaxy-central: guerler: Workflow: Insert conditional tool model creation
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/052c03f52326/ Changeset: 052c03f52326 User: guerler Date: 2015-01-29 04:53:19+00:00 Summary: Workflow: Insert conditional tool model creation Affected #: 1 file diff -r c99e026b4b0a1a1f7ac5bf15e92859085c5bdab7 -r 052c03f52326a5755013a6b5e9d7ad746d4dd940 lib/galaxy/webapps/galaxy/controllers/workflow.py --- a/lib/galaxy/webapps/galaxy/controllers/workflow.py +++ b/lib/galaxy/webapps/galaxy/controllers/workflow.py @@ -618,12 +618,18 @@ 'tool_state': tool_state } ) + # create tool model and default tool state (if missing) + tool_model = None + if type == 'tool' and not tool_state: + tool_model = module.tool.to_json(trans, **incoming) + module.state.inputs = copy.deepcopy(tool_model['state_inputs']) + # update module state module.update_state( incoming ) if type == 'tool': return { - 'tool_model': None, + 'tool_model': tool_model, 'tool_state': module.get_state(), 'data_inputs': module.get_data_inputs(), 'data_outputs': module.get_data_outputs(), @@ -653,12 +659,15 @@ """ trans.workflow_building_mode = True module = module_factory.new( trans, type, **kwargs ) + tool_model = None + if type == 'tool': + tool_model = module.tool.to_json(trans) return { 'type': module.type, 'name': module.get_name(), 'tool_id': module.get_tool_id(), 'tool_state': module.get_state(), - 'tool_model': None, + 'tool_model': tool_model, 'tooltip': module.get_tooltip( static_path=url_for( '/static' ) ), 'data_inputs': module.get_data_inputs(), 'data_outputs': module.get_data_outputs(), Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org