From 181293f0540ca1c5ae9ea3153ff1da337cdc669e Mon Sep 17 00:00:00 2001 From: Dave Bouvier Date: Wed, 31 Jul 2013 10:38:40 -0400 Subject: [PATCH] Fix server error when displaying a tool with conditionals in the tool shed. --- lib/galaxy/tools/parameters/basic.py | 4 ++-- templates/webapps/tool_shed/repository/tool_form.mako | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index da833aa9c7c..317876ce3d7 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1514,8 +1514,8 @@ class DataToolParameter( ToolParameter ): NOTE: This is wasteful since dynamic options and dataset collection happens twice (here and when generating HTML). """ - # Can't look at history in workflow mode - if trans is None or trans.workflow_building_mode: + # Can't look at history in workflow mode. Tool shed has no histories. + if trans is None or trans.workflow_building_mode or trans.webapp.name == 'tool_shed': return DummyDataset() assert trans is not None, "DataToolParameter requires a trans" history = trans.get_history() diff --git a/templates/webapps/tool_shed/repository/tool_form.mako b/templates/webapps/tool_shed/repository/tool_form.mako index f52ea2d9451..491d8ca2345 100644 --- a/templates/webapps/tool_shed/repository/tool_form.mako +++ b/templates/webapps/tool_shed/repository/tool_form.mako @@ -70,6 +70,8 @@ <%def name="row_for_param( prefix, param, parent_state, other_values )"> <% + # Disable refresh_on_change for select lists displayed in the tool shed. + param.refresh_on_change = False label = param.get_label() if isinstance( param, DataToolParameter ) or isinstance( param, ColumnListParameter ) or isinstance( param, GenomeBuildParameter ): field = SelectField( param.name )