diff options
author | Rémy Coutable <remy@rymai.me> | 2017-06-29 12:53:55 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-29 12:53:55 +0000 |
commit | 572fa2cb0263b87b5323ebb0d72bc71fa252df78 (patch) | |
tree | bc9422f43dcfdd47a888874bbdd26f5cda13f683 /lib | |
parent | 4f1d3c62f58aec2d795c0b4546bb5d69b2317d65 (diff) | |
parent | 5681bf63490a945df6a70c85bebd94f376181307 (diff) | |
download | gitlab-ce-572fa2cb0263b87b5323ebb0d72bc71fa252df78.tar.gz |
Merge branch '34280-gitalyclient-sort_by_param-invalid-sort_by-key-recently_updated' into 'master'
Fix a bug where an invalid sort param value was passed to Gitaly
Closes #34280
See merge request !12534
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/gitaly_client/ref.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/gitaly_client/ref.rb b/lib/gitlab/gitaly_client/ref.rb index f4786f28a3a..2d61992f595 100644 --- a/lib/gitlab/gitaly_client/ref.rb +++ b/lib/gitlab/gitaly_client/ref.rb @@ -59,6 +59,8 @@ module Gitlab end def sort_by_param(sort_by) + sort_by = 'name' if sort_by == 'name_asc' + enum_value = Gitaly::FindLocalBranchesRequest::SortBy.resolve(sort_by.upcase.to_sym) raise ArgumentError, "Invalid sort_by key `#{sort_by}`" unless enum_value enum_value |