commit/galaxy-central: greg: When storing tool panel section information for installed repository tools, make sure tool section id, name and version values are an empty string rather than None.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/f8cf58d19ea0/ changeset: f8cf58d19ea0 user: greg date: 2012-01-30 18:17:56 summary: When storing tool panel section information for installed repository tools, make sure tool section id, name and version values are an empty string rather than None. affected #: 3 files diff -r 016630d4fb0e9b17b41781613951ae8c89353ca2 -r f8cf58d19ea0bda386ef4cf85a365596a37c3e64 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -192,7 +192,19 @@ else: # The tool_panel_section was introduced late, so set it's value if its missing in the metadata. if section: - tool_panel_section = dict( id=section.id, version=section.version, name=section.name ) + if section.id is None: + section_id = '' + else: + section_id = section.id + if section.version is None: + section_version = '' + else: + section_version = section.version + if section.name is None: + section_name = '' + else: + section_name = section.name + tool_panel_section = dict( id=section_id, version=section_version, name=section_name ) update_needed = True else: tool_panel_section = dict( id='', version='', name='' ) diff -r 016630d4fb0e9b17b41781613951ae8c89353ca2 -r f8cf58d19ea0bda386ef4cf85a365596a37c3e64 lib/galaxy/util/shed_util.py --- a/lib/galaxy/util/shed_util.py +++ b/lib/galaxy/util/shed_util.py @@ -166,6 +166,9 @@ datatypes_config = None # Keep track of the section in the tool panel in which this repository's tools will be contained. if tool_section_dict: + for k, v in tool_section_dict.items(): + if v is None: + tool_section_dict[ k ] = '' metadata_dict[ 'tool_panel_section' ] = tool_section_dict else: metadata_dict[ 'tool_panel_section' ] = dict( id='', version='', name='' ) @@ -604,9 +607,18 @@ distribution but are now in the main Galaxy tool shed. """ if tool_section: - section_id = tool_section.id - section_version = tool_section.version - section_name = tool_section.name + if tool_section.id is None: + section_id = '' + else: + section_id = tool_section.id + if tool_section.version is None: + section_version = '' + else: + section_version = tool_section.version + if tool_section.name is None: + section_name = '' + else: + section_name = tool_section.name else: section_id = '' section_version = '' diff -r 016630d4fb0e9b17b41781613951ae8c89353ca2 -r f8cf58d19ea0bda386ef4cf85a365596a37c3e64 templates/admin/tool_shed_repository/deactivate_or_uninstall_repository.mako --- a/templates/admin/tool_shed_repository/deactivate_or_uninstall_repository.mako +++ b/templates/admin/tool_shed_repository/deactivate_or_uninstall_repository.mako @@ -81,11 +81,11 @@ <div class="toolParamHelp" style="clear: both;"> * The repository record's deleted column in the tool_shed_repository database table will be set to True. </div> + <div class="toolParamHelp" style="clear: both;"> + * The repository record's uninstalled column in the tool_shed_repository database table will be set to True. + </div> %if repository.dist_to_shed: <div class="toolParamHelp" style="clear: both;"> - * The repository record's uninstalled column in the tool_shed_repository database table will be set to True. - </div> - <div class="toolParamHelp" style="clear: both;"> * All records associated with this repository will be eliminated from the tool_id_guid_map database table. </div> %endif 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)
-
Bitbucket