1. galaxy
  2. galaxy-central

Commits

Greg Von Kuster  committed be81990

Enable reversing the list of tool version ids for tool included in tool shed repositories installed into a local Galaxy instance.

  • Participants
  • Parent commits 0bd2cc0
  • Branches default

Comments (0)

Files changed (2)

File lib/galaxy/model/__init__.py

View file
             tool_versions.append( self )
         __descendants( app, self )
         return tool_versions
-    def get_version_ids( self, app ):
+    def get_version_ids( self, app, reverse=False ):
+        if reverse:
+            version_ids = []
+            for tool_version in self.get_versions( app ):
+                version_ids.insert( 0, tool_version.tool_id )
+            return version_ids
         return [ tool_version.tool_id for tool_version in self.get_versions( app ) ]
 
 class ToolVersionAssociation( object ):

File lib/galaxy/web/controllers/admin_toolshed.py

View file
         return get_repository_file_contents( file_path )
     def get_versions_of_tool( self, app, guid ):
         tool_version = get_tool_version( app, guid )
-        return tool_version.get_version_ids( app )
+        return tool_version.get_version_ids( app, reverse=True )
     @web.expose
     @web.require_admin
     def initiate_repository_installation( self, trans, shed_repository_ids, encoded_kwd, reinstalling=False ):