diff options
author | Go MAEDA <maeda@farend.jp> | 2020-04-02 06:22:23 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-04-02 06:22:23 +0000 |
commit | c5ec830b68b7a3f34af2b70cc876451e43dbc603 (patch) | |
tree | 2b1ae9c8c6179ecdc70ba80d08f8c21a2c770b2f /lib | |
parent | fd75ebcd12cb39f14b16dc7e98df4f39969bc885 (diff) | |
download | redmine-c5ec830b68b7a3f34af2b70cc876451e43dbc603.tar.gz redmine-c5ec830b68b7a3f34af2b70cc876451e43dbc603.zip |
Remove duplicate keys from sort criteria (#32737).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@19636 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/sort_criteria.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/redmine/sort_criteria.rb b/lib/redmine/sort_criteria.rb index efe40514b..4de81900e 100644 --- a/lib/redmine/sort_criteria.rb +++ b/lib/redmine/sort_criteria.rb @@ -90,6 +90,7 @@ module Redmine def normalize! self.reject! {|s| s.first.blank? } + self.uniq! {|s| s.first } self.collect! {|s| s = Array(s); [s.first, (s.last == false || s.last.to_s == 'desc') ? 'desc' : 'asc']} self.replace self.first(3) end |