From 2619333cc60d8c3569234eee6bc53353c0998722 Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Sun, 5 Apr 2020 15:39:48 +0200 Subject: [PATCH] remove uses of website_from --- app/dashboard/views/alias_contact_manager.py | 6 ++++-- app/dashboard/views/alias_log.py | 2 -- email_handler.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/dashboard/views/alias_contact_manager.py b/app/dashboard/views/alias_contact_manager.py index 4249e321..1ad1ead1 100644 --- a/app/dashboard/views/alias_contact_manager.py +++ b/app/dashboard/views/alias_contact_manager.py @@ -134,11 +134,13 @@ def alias_contact_manager(alias_id): url_for("dashboard.alias_contact_manager", alias_id=alias_id) ) - contact_name = contact.website_from + delete_contact_email = contact.website_email Contact.delete(contact_id) db.session.commit() - flash(f"Reverse-alias for {contact_name} has been deleted", "success") + flash( + f"Reverse-alias for {delete_contact_email} has been deleted", "success" + ) return redirect( url_for("dashboard.alias_contact_manager", alias_id=alias_id) diff --git a/app/dashboard/views/alias_log.py b/app/dashboard/views/alias_log.py index 7b9d62d5..00748a30 100644 --- a/app/dashboard/views/alias_log.py +++ b/app/dashboard/views/alias_log.py @@ -10,7 +10,6 @@ from app.models import Alias, EmailLog, Contact class AliasLog: website_email: str - website_from: str reverse_alias: str alias: str when: arrow.Arrow @@ -78,7 +77,6 @@ def get_alias_log(alias: Alias, page_id=0): for contact, email_log in q: al = AliasLog( website_email=contact.website_email, - website_from=contact.website_from, reverse_alias=contact.website_send_to(), alias=alias.email, when=email_log.created_at, diff --git a/email_handler.py b/email_handler.py index 5f573a79..d446678a 100644 --- a/email_handler.py +++ b/email_handler.py @@ -157,7 +157,7 @@ def replace_header_when_forward(msg: Message, alias: Alias, header: str): contact = Contact.get_by(alias_id=alias.id, website_email=contact_email) if contact: - # update the website_from if needed + # update the contact name if needed if contact.name != contact_name: LOG.d( "Update contact %s name %s to %s",