mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Sort rval so that newest tool appears last in rval
This commit is contained in:
@@ -446,6 +446,9 @@ class AbstractToolBox(Dictifiable, ManagesIntegratedToolPanelMixin):
|
||||
for tool in self._tools_by_id.values():
|
||||
if tool.old_id == tool_id:
|
||||
rval.append(tool)
|
||||
# if we don't have a lineage_map for this tool we need to sort by version,
|
||||
# so that the last tool in rval is the newest tool.
|
||||
rval.sort(key=lambda t: t.version)
|
||||
if rval:
|
||||
if get_all_versions:
|
||||
return rval
|
||||
|
||||
Reference in New Issue
Block a user