From 84e0e7e01e732b28dedebdf8a3fbea8225fece9a Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sat, 24 Jun 2017 13:59:16 +0200 Subject: [PATCH] Access tool.lineage only if tool was loaded --- lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py index cd4124afb12..886c95cac27 100644 --- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py +++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py @@ -2064,7 +2064,8 @@ class AdminToolshed( AdminGalaxy ): tool = trans.app.toolbox.load_tool( os.path.abspath( tool_config ), guid=tool_metadata[ 'guid' ] ) if tool: tool._lineage = trans.app.toolbox._lineage_map.register( tool ) - tool_lineage = tool.lineage.get_version_ids(reverse=True) + if tool: + tool_lineage = tool.lineage.get_version_ids(reverse=True) break return trans.fill_template( "/admin/tool_shed_repository/view_tool_metadata.mako", repository=repository,