diff --git a/app/domain/sorting_hat/finder.rb b/app/domain/sorting_hat/finder.rb index f1242a5..dbaa634 100644 --- a/app/domain/sorting_hat/finder.rb +++ b/app/domain/sorting_hat/finder.rb @@ -50,7 +50,7 @@ def group_for_role(scope) scope = scope.where("groups.type LIKE ?", "%#{SortingHat::ROLES.fetch(@role)}") groups = scope.without_deleted - groups.to_a.one? ? groups : Group.none + groups.to_a.any? ? groups : Group.none end def root