diff --git a/delete_inactives.py b/delete_inactives.py index a814025..466fc38 100644 --- a/delete_inactives.py +++ b/delete_inactives.py @@ -146,7 +146,7 @@ delete_inactives(mailing_db, mailing_db_user, mailing_db_table, deletion_accepte ############################################################################### deletion_accepted = False -query = "select account_id, username, email, to_be_deleted, feedback, recipient_error, elapsed_days from inactive_users where to_be_deleted = 'f' and feedback = 'f' and recipient_error = 'f' and emailed_at < now() - interval '31 days'" +query = "select account_id, username, email, to_be_deleted, feedback, recipient_error, elapsed_days from " + mailing_db_table + " where to_be_deleted = 'f' and feedback = 'f' and recipient_error = 'f' and emailed_at < now() - interval '31 days'" id_array = [] username_array = [] delete_inactives(mailing_db, mailing_db_user, mailing_db_table, deletion_accepted, query, id_array, username_array)