summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2019-08-07 16:24:17 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2019-08-08 13:34:07 +0200
commita4e13a5966b45e500b69117d080e4794d92c7668 (patch)
treee28b5204a9c2b48b212e7d3bd0162167ce278019
parent4c53b3945c874933d6da517ade161d66f8f87b21 (diff)
downloadgitlab-ce-a4e13a5966b45e500b69117d080e4794d92c7668.tar.gz
Backport EE changes to ProjectSearchResultslib-differences
EE made some changes to the project_ids_relation method, but these were not backported to CE.
-rw-r--r--lib/gitlab/project_search_results.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/project_search_results.rb b/lib/gitlab/project_search_results.rb
index 827f4f77f36..5e77d31760d 100644
--- a/lib/gitlab/project_search_results.rb
+++ b/lib/gitlab/project_search_results.rb
@@ -134,9 +134,11 @@ module Gitlab
project.repository.commit(key) if Commit.valid_hash?(key)
end
+ # rubocop: disable CodeReuse/ActiveRecord
def project_ids_relation
- project
+ Project.where(id: project).select(:id).reorder(nil)
end
+ # rubocop: enabled CodeReuse/ActiveRecord
def filter_milestones_by_project(milestones)
return Milestone.none unless Ability.allowed?(@current_user, :read_milestone, @project)