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

Remove pluck from descendants

parent 4566a43c
......@@ -86,8 +86,10 @@ class GroupsFinder < UnionFinder
return groups unless params[:parent]
if include_parent_descendants?
descendants = Gitlab::ObjectHierarchy.new(Group.where(id: params[:parent])).descendants
groups.id_in(descendants.pluck(:id))
descendants = Gitlab::ObjectHierarchy
.new(groups.where(id: params[:parent]))
.descendants
groups.id_in(descendants)
else
groups.where(parent: params[:parent])
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