Commit c8552970 authored by mvdbeek's avatar mvdbeek
Browse files

Sort by tool version when picking a tool with an unavailable version

parent 806beaca
......@@ -455,8 +455,8 @@ class AbstractToolBox(Dictifiable, ManagesIntegratedToolPanelMixin):
for tool in rval:
if tool.version == tool_version:
return tool
# No tool matches by version, simply return the first available tool found
return rval[0]
# No tool matches by version, simply return the newest matching tool
return rval[-1]
# We now likely have a Toolshed guid passed in, but no supporting database entries
# If the tool exists by exact id and is loaded then provide exact match within a list
if tool_id in self._tools_by_id:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment