diff --git a/app/jobs/decidim/cleaner/clean_inactive_users_job.rb b/app/jobs/decidim/cleaner/clean_inactive_users_job.rb index 0b5a4eb..236f43a 100644 --- a/app/jobs/decidim/cleaner/clean_inactive_users_job.rb +++ b/app/jobs/decidim/cleaner/clean_inactive_users_job.rb @@ -9,11 +9,11 @@ def perform Decidim::Organization.find_each do |organization| next unless organization.delete_inactive_users? - send_warning(Decidim::User.unscoped.where(organization:) + send_warning(Decidim::User.unscoped.where(organization: organization) .not_deleted .where.not(email: "") .where("current_sign_in_at < ?", email_inactive_before_date(organization))) - delete_user_and_send_email(Decidim::User.unscoped.where(organization:) + delete_user_and_send_email(Decidim::User.unscoped.where(organization: organization) .not_deleted .where.not(email: "") .where("warning_date < ?", delete_inactive_before_date(organization)))