diff options
Diffstat (limited to 'app/controllers/concerns/group_tree.rb')
-rw-r--r-- | app/controllers/concerns/group_tree.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/concerns/group_tree.rb b/app/controllers/concerns/group_tree.rb index 4f56346832c..e9a7d6a3152 100644 --- a/app/controllers/concerns/group_tree.rb +++ b/app/controllers/concerns/group_tree.rb @@ -32,14 +32,14 @@ module GroupTree def filtered_groups_with_ancestors(groups) filtered_groups = groups.search(params[:filter]).page(params[:page]) - if Group.supports_nested_groups? + if Group.supports_nested_objects? # We find the ancestors by ID of the search results here. # Otherwise the ancestors would also have filters applied, # which would cause them not to be preloaded. # # Pagination needs to be applied before loading the ancestors to # make sure ancestors are not cut off by pagination. - Gitlab::GroupHierarchy.new(Group.where(id: filtered_groups.select(:id))) + Gitlab::ObjectHierarchy.new(Group.where(id: filtered_groups.select(:id))) .base_and_ancestors else filtered_groups |