From 6b31b8926e6ea388c1017b33fd1268b655038dec Mon Sep 17 00:00:00 2001 From: Son Date: Fri, 7 Jan 2022 14:27:53 +0100 Subject: [PATCH] fix comment --- app/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models.py b/app/models.py index f2085399..87e6a612 100644 --- a/app/models.py +++ b/app/models.py @@ -1559,8 +1559,9 @@ class Contact(Base, ModelMixin): # make sure email is lowercase and doesn't have any whitespace website_email = sanitize_email(website_email) - # make sure alias is not in global trash, i.e. DeletedAlias table - if Contact.get_by(reply_email=website_email): + # make sure contact.website_email isn't a reverse alias + orig_contact = Contact.get_by(reply_email=website_email) + if orig_contact: raise CannotCreateContactForReverseAlias Session.add(new_contact)