From bb0e8afcf6e3e4d3a1ddffbf5a95ea2c6cee7a1f Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Fri, 3 Feb 2012 16:30:30 -0500 Subject: [PATCH] Correctly handle ToolPanelSection objects when presenting the tool panel sectin redio buttons for selecting a section to contain tools installed with a tool shed repostory into a local Galaxy instance. --- lib/galaxy/web/controllers/admin_toolshed.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/web/controllers/admin_toolshed.py b/lib/galaxy/web/controllers/admin_toolshed.py index c69460fefa9..5b8c97b812e 100644 --- a/lib/galaxy/web/controllers/admin_toolshed.py +++ b/lib/galaxy/web/controllers/admin_toolshed.py @@ -797,8 +797,9 @@ def build_shed_tool_conf_select_field( trans ): def build_tool_panel_section_select_field( trans ): """Build a SelectField whose options are the sections of the current in-memory toolbox.""" options = [] - for k, tool_section in trans.app.toolbox.tool_panel.items(): - options.append( ( tool_section.name, tool_section.id ) ) + for k, v in trans.app.toolbox.tool_panel.items(): + if isinstance( v, tools.ToolSection ): + options.append( ( v.name, v.id ) ) select_field = SelectField( name='tool_panel_section', display='radio' ) for option_tup in options: select_field.add_option( option_tup[0], option_tup[1] )