Fix server error when displaying a tool with conditionals in the tool shed.

This commit is contained in:
Dave Bouvier
2013-07-31 10:38:40 -04:00
parent 4b2b0966eb
commit 181293f054
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -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()
@@ -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 )