summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-09-10 18:55:52 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-04 22:49:41 +0200
commit6388b8feec28b0f0ca2f9e6d9c5c7b4e404fed2f (patch)
treeb6a92310327ed1bf38a2df3cdba67aa56391b83a /app/finders
parent79cc3c8e3e7938ea53459e34ca585ae66791199e (diff)
downloadgitlab-ce-6388b8feec28b0f0ca2f9e6d9c5c7b4e404fed2f.tar.gz
Don't include the parent in search results if it matches
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/group_children_finder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/group_children_finder.rb b/app/finders/group_children_finder.rb
index 07b97163c62..9760f9ef802 100644
--- a/app/finders/group_children_finder.rb
+++ b/app/finders/group_children_finder.rb
@@ -52,7 +52,7 @@ class GroupChildrenFinder
end
def subgroups_matching_filter
- all_subgroups.search(params[:filter])
+ all_subgroups.where.not(id: parent_group).search(params[:filter])
end
def subgroups