diff options
Diffstat (limited to 'app/services/namespaces/in_product_marketing_emails_service.rb')
-rw-r--r-- | app/services/namespaces/in_product_marketing_emails_service.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/services/namespaces/in_product_marketing_emails_service.rb b/app/services/namespaces/in_product_marketing_emails_service.rb index 45b4619ddbe..f009f5d8538 100644 --- a/app/services/namespaces/in_product_marketing_emails_service.rb +++ b/app/services/namespaces/in_product_marketing_emails_service.rb @@ -63,7 +63,10 @@ module Namespaces .completed_actions_with_latest_in_range(completed_actions, range) .incomplete_actions(incomplete_action) - Group.joins(:onboarding_progress).merge(onboarding_progress_scope) + # Filtering out sub-groups is a temporary fix to prevent calling + # `.root_ancestor` on groups that are not root groups. + # See https://gitlab.com/groups/gitlab-org/-/epics/5594 for more information. + Group.where(parent_id: nil).joins(:onboarding_progress).merge(onboarding_progress_scope) end def users_for_group(group) |