Forráskód Böngészése

use mailbox_already_used instead of email_already_used

Son NK 5 éve
szülő
commit
9d25d099e1
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      app/dashboard/views/mailbox_detail.py

+ 2 - 2
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)
                 ):