From a4e13a5966b45e500b69117d080e4794d92c7668 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Wed, 7 Aug 2019 16:24:17 +0200 Subject: Backport EE changes to ProjectSearchResults EE made some changes to the project_ids_relation method, but these were not backported to CE. --- lib/gitlab/project_search_results.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- cgit v1.2.1