commit/galaxy-central: greg: Fix for ordering the options of the select list displaying change sets for a tool shed repository.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/8aa5dfcbbb08/ changeset: 8aa5dfcbbb08 user: greg date: 2012-03-26 21:43:27 summary: Fix for ordering the options of the select list displaying change sets for a tool shed repository. affected #: 1 file diff -r 29f8601357203ad282f3848b2fa2c144ef6980f2 -r 8aa5dfcbbb0815cb2b41eb381ff0202bff4bb517 lib/galaxy/webapps/community/controllers/common.py --- a/lib/galaxy/webapps/community/controllers/common.py +++ b/lib/galaxy/webapps/community/controllers/common.py @@ -1003,6 +1003,10 @@ revision_label = get_revision_label( trans, repository, changeset_revision ) options.append( ( revision_label, changeset_revision ) ) refresh_on_change_values.append( changeset_revision ) + # Sort options by the revision label. Even though the downloadable_revisions query sorts by update_time, + # the changeset revisions may not be sorted correctly because setting metadata over time will reset update_time, + # screwing up the order. + sorted_options = sorted( options ) if add_id_to_name: name = 'changeset_revision_%d' % repository.id else: @@ -1010,7 +1014,7 @@ select_field = SelectField( name=name, refresh_on_change=True, refresh_on_change_values=refresh_on_change_values ) - for option_tup in options: + for option_tup in sorted_options: selected = selected_value and option_tup[1] == selected_value select_field.add_option( option_tup[0], option_tup[1], selected=selected ) return select_field Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket