From 9d25d099e1535569a0ebf2fc60a7a1e1b0ddfa12 Mon Sep 17 00:00:00 2001 From: Son NK Date: Mon, 9 Mar 2020 14:01:27 +0100 Subject: [PATCH] use mailbox_already_used instead of email_already_used --- app/dashboard/views/mailbox_detail.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/dashboard/views/mailbox_detail.py b/app/dashboard/views/mailbox_detail.py index 018514f7..c87fe34a 100644 --- a/app/dashboard/views/mailbox_detail.py +++ b/app/dashboard/views/mailbox_detail.py @@ -9,7 +9,7 @@ from app.config import MAILBOX_SECRET from app.config import URL from app.dashboard.base import dashboard_bp from app.email_utils import can_be_used_as_personal_email, email_already_used -from app.email_utils import send_email, render +from app.email_utils import mailbox_already_used, render, send_email from app.extensions import db from app.log import LOG from app.models import GenEmail, DeletedAlias @@ -48,7 +48,7 @@ def mailbox_detail_route(mailbox_id): if new_email != mailbox.email and not pending_email: # check if this email is not already used if ( - email_already_used(new_email) + mailbox_already_used(new_email, current_user) or GenEmail.get_by(email=new_email) or DeletedAlias.get_by(email=new_email) ):