summaryrefslogtreecommitdiff
path: root/lib/gitlab/search_results.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-03 06:07:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-03 06:07:06 +0000
commita3759fc2e1f8aa1493840ab0d4ebd4a2e5f495aa (patch)
treefb8f046819669955006fe21043bfcc13dbe40209 /lib/gitlab/search_results.rb
parent336483a4c150a112e83d95538218c59d9a952768 (diff)
downloadgitlab-ce-a3759fc2e1f8aa1493840ab0d4ebd4a2e5f495aa.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/search_results.rb')
-rw-r--r--lib/gitlab/search_results.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/search_results.rb b/lib/gitlab/search_results.rb
index 37414f9e2b1..8658fa343e2 100644
--- a/lib/gitlab/search_results.rb
+++ b/lib/gitlab/search_results.rb
@@ -144,7 +144,7 @@ module Gitlab
sort_by = ::Gitlab::Search::SortOptions.sort_and_direction(order_by, sort)
# Reset sort to default if the chosen one is not supported by scope
- sort_by = nil if SCOPE_ONLY_SORT[sort_by] && !SCOPE_ONLY_SORT[sort_by].include?(scope)
+ sort_by = nil if SCOPE_ONLY_SORT[sort_by] && SCOPE_ONLY_SORT[sort_by].exclude?(scope)
case sort_by
when :created_at_asc