Hide download for deleted refused emails

This commit is contained in:
Son NK 2020-03-15 11:14:58 +01:00
parent 71a9fc38a9
commit e21e27eefa
2 changed files with 7 additions and 4 deletions

View File

@ -27,9 +27,12 @@
Sent {{ refused_email.created_at | dt }}
</div>
<a href="{{ refused_email.get_url() }}" class="mt-4">View →</a>
<div class="small-text">This will download a ".eml" file that you can open in your favorite email client</div>
{% if refused_email.deleted %}
Email deleted {{ refused_email.deleted_at | dt }}
{% else %}
<a href="{{ refused_email.get_url() }}" class="mt-4">Download →</a>
<div class="small-text">This will download a ".eml" file that you can open in your favorite email client</div>
{% endif %}
</div>
{% endfor %}

View File

@ -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()