use mailbox_already_used instead of email_already_used
This commit is contained in:
parent
3266a5982a
commit
9d25d099e1
|
@ -9,7 +9,7 @@ from app.config import MAILBOX_SECRET
|
||||||
from app.config import URL
|
from app.config import URL
|
||||||
from app.dashboard.base import dashboard_bp
|
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 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.extensions import db
|
||||||
from app.log import LOG
|
from app.log import LOG
|
||||||
from app.models import GenEmail, DeletedAlias
|
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:
|
if new_email != mailbox.email and not pending_email:
|
||||||
# check if this email is not already used
|
# check if this email is not already used
|
||||||
if (
|
if (
|
||||||
email_already_used(new_email)
|
mailbox_already_used(new_email, current_user)
|
||||||
or GenEmail.get_by(email=new_email)
|
or GenEmail.get_by(email=new_email)
|
||||||
or DeletedAlias.get_by(email=new_email)
|
or DeletedAlias.get_by(email=new_email)
|
||||||
):
|
):
|
||||||
|
|
Loading…
Reference in a new issue