Commit 0ad0ccd0 authored by Eugenia Grieff's avatar Eugenia Grieff

Remove pluck from descendants

parent 4566a43c
...@@ -86,8 +86,10 @@ class GroupsFinder < UnionFinder ...@@ -86,8 +86,10 @@ class GroupsFinder < UnionFinder
return groups unless params[:parent] return groups unless params[:parent]
if include_parent_descendants? if include_parent_descendants?
descendants = Gitlab::ObjectHierarchy.new(Group.where(id: params[:parent])).descendants descendants = Gitlab::ObjectHierarchy
groups.id_in(descendants.pluck(:id)) .new(groups.where(id: params[:parent]))
.descendants
groups.id_in(descendants)
else else
groups.where(parent: params[:parent]) groups.where(parent: params[:parent])
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment