diff options
Diffstat (limited to 'app/finders/group_descendants_finder.rb')
-rw-r--r-- | app/finders/group_descendants_finder.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/finders/group_descendants_finder.rb b/app/finders/group_descendants_finder.rb index 3f231bd8b10..cdd18b89525 100644 --- a/app/finders/group_descendants_finder.rb +++ b/app/finders/group_descendants_finder.rb @@ -19,12 +19,8 @@ class GroupDescendantsFinder Kaminari.paginate_array(all_required_elements, total_count: total_count) end - def subgroup_count - @subgroup_count ||= subgroups.count - end - - def project_count - @project_count ||= projects.count + def has_children? + projects.any? || subgroups.any? end private |