summaryrefslogtreecommitdiff
path: root/app/services/search
diff options
context:
space:
mode:
authorzenati <zenati@informatique.univ-paris-diderot.fr>2015-06-09 13:28:11 +0200
committerzenati <zenati@informatique.univ-paris-diderot.fr>2015-06-09 13:42:01 +0200
commitb0de6e9ae27a6364819f47d13d827a8aa253c83e (patch)
treea6d647652acd7c6e878cbd246488384f792c251a /app/services/search
parent9562f028594c6d61834d48f75f8379b0de2ba8ae (diff)
downloadgitlab-ce-b0de6e9ae27a6364819f47d13d827a8aa253c83e.tar.gz
An `in_namespace` scope is already present
Diffstat (limited to 'app/services/search')
-rw-r--r--app/services/search/global_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/search/global_service.rb b/app/services/search/global_service.rb
index 0bcc50c81a7..e904cb6c6fc 100644
--- a/app/services/search/global_service.rb
+++ b/app/services/search/global_service.rb
@@ -9,7 +9,7 @@ module Search
def execute
group = Group.find_by(id: params[:group_id]) if params[:group_id].present?
projects = ProjectsFinder.new.execute(current_user)
- projects = projects.where(namespace_id: group.id) if group
+ projects = projects.in_namespace(group.id) if group
project_ids = projects.pluck(:id)
Gitlab::SearchResults.new(project_ids, params[:search])