From ee987592786b061e3962a25d7f6dad42ff189186 Mon Sep 17 00:00:00 2001 From: spla Date: Sun, 5 Jul 2020 23:46:04 +0200 Subject: [PATCH] Fixed mailing_db_table variable --- delete_inactives.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)