use mailbox_already_used instead of email_already_used

This commit is contained in:
Son NK 2020-03-09 14:01:27 +01:00
parent 3266a5982a
commit 9d25d099e1
1 changed files with 2 additions and 2 deletions

View File

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