diff --git a/app/models/mailshot.rb b/app/models/mailshot.rb index 614444f129..9c7ea20a92 100644 --- a/app/models/mailshot.rb +++ b/app/models/mailshot.rb @@ -111,11 +111,11 @@ def audience_for_bc_mid_seniors(_) def audience_for_bc_unspecified_recent_90(_) [ - User::Data.where(seniority: nil). - where('user_data.last_visited_on >= ?', Time.current - 90.days). + User::Data.where('user_data.last_visited_on >= ?', Time.current - 90.days). includes(user: :bootcamp_data), lambda do |user_data| user = user_data.user + return if user.seniority.present? return if user.bootcamp_data&.paid? user