diff options
author | Robert Speicher <robert@gitlab.com> | 2018-01-05 20:53:31 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-01-17 04:04:38 +0300 |
commit | 8f4b06137577f868ffaa41d10c27aa1e763bc825 (patch) | |
tree | 26729d296b21930b17b1730292ac7d4ea59c9cc4 /app/finders | |
parent | 6846b70dd499f5aeee6936b3f9604fe42cafe87a (diff) |
Merge branch 'milestones-finder-order-fix' into 'security-10-3'
Remove order param from the MilestoneFinder
See merge request gitlab/gitlabhq!2259
(cherry picked from commit 14408042e78f2ebc2644f956621b461dbfa3d36d)
155881e7 Remove order param from the MilestoneFinder
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/milestones_finder.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/finders/milestones_finder.rb b/app/finders/milestones_finder.rb index 0a5a0ea2f35..b4605fca193 100644 --- a/app/finders/milestones_finder.rb +++ b/app/finders/milestones_finder.rb @@ -46,11 +46,7 @@ class MilestonesFinder end def order(items) - if params.has_key?(:order) - items.reorder(params[:order]) - else - order_statement = Gitlab::Database.nulls_last_order('due_date', 'ASC') - items.reorder(order_statement) - end + order_statement = Gitlab::Database.nulls_last_order('due_date', 'ASC') + items.reorder(order_statement).order('title ASC') end end |