From e21e27eefad0244d797f3b165473f55352a7b1cb Mon Sep 17 00:00:00 2001 From: Son NK Date: Sun, 15 Mar 2020 11:14:58 +0100 Subject: [PATCH] Hide download for deleted refused emails --- app/dashboard/templates/dashboard/refused_email.html | 9 ++++++--- cron.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/dashboard/templates/dashboard/refused_email.html b/app/dashboard/templates/dashboard/refused_email.html index a42b7ec2..64c68394 100644 --- a/app/dashboard/templates/dashboard/refused_email.html +++ b/app/dashboard/templates/dashboard/refused_email.html @@ -27,9 +27,12 @@ Sent {{ refused_email.created_at | dt }} - - View → -
This will download a ".eml" file that you can open in your favorite email client
+ {% if refused_email.deleted %} + Email deleted {{ refused_email.deleted_at | dt }} + {% else %} + Download → +
This will download a ".eml" file that you can open in your favorite email client
+ {% endif %} {% endfor %} diff --git a/cron.py b/cron.py index fa0a742c..3e0873c7 100644 --- a/cron.py +++ b/cron.py @@ -189,7 +189,7 @@ if __name__ == "__main__": "notify_trial_end", "notify_manual_subscription_end", "notify_premium_end", - "delete_refused_emails" + "delete_refused_emails", ], ) args = parser.parse_args()