Browse Source

Hide download for deleted refused emails

Son NK 5 years ago
parent
commit
e21e27eefa
2 changed files with 7 additions and 4 deletions
  1. 6 3
      app/dashboard/templates/dashboard/refused_email.html
  2. 1 1
      cron.py

+ 6 - 3
app/dashboard/templates/dashboard/refused_email.html

@@ -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 %}

+ 1 - 1
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()