Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2019-08-07 17:24:17 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2019-08-08 14:34:07 +0300
commita4e13a5966b45e500b69117d080e4794d92c7668 (patch)
treee28b5204a9c2b48b212e7d3bd0162167ce278019 /lib/gitlab/project_search_results.rb
parent4c53b3945c874933d6da517ade161d66f8f87b21 (diff)
Backport EE changes to ProjectSearchResults
EE made some changes to the project_ids_relation method, but these were not backported to CE.
Diffstat (limited to 'lib/gitlab/project_search_results.rb')
-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)