mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-30 18:13:23 +08:00
Remove version by slicing tool_id before last slash
As pointed out by @nsoranzo, this may avoid conflicts when the version string appears more than once in tool_id.
This commit is contained in:
@@ -8,8 +8,8 @@ def remove_version_from_guid( guid ):
|
||||
"""
|
||||
if "/repos/" not in guid:
|
||||
return None
|
||||
tool_version = guid.split("/")[-1]
|
||||
return guid.split(tool_version)[0]
|
||||
last_slash = guid.rfind('/')
|
||||
return guid[:last_slash]
|
||||
|
||||
|
||||
class LineageMap(object):
|
||||
|
||||
Reference in New Issue
Block a user