mirror of
https://github.com/simple-login/app.git
synced 2024-11-17 22:21:38 +08:00
no need to check for deletedAlias when changing mailbox or user email
This commit is contained in:
parent
adce27b88b
commit
9bb17533c1
2 changed files with 2 additions and 5 deletions
|
@ -51,7 +51,6 @@ def mailbox_detail_route(mailbox_id):
|
|||
if (
|
||||
mailbox_already_used(new_email, current_user)
|
||||
or Alias.get_by(email=new_email)
|
||||
or DeletedAlias.get_by(email=new_email)
|
||||
):
|
||||
flash(f"Email {new_email} already used", "error")
|
||||
elif not email_domain_can_be_used_as_mailbox(new_email):
|
||||
|
|
|
@ -73,10 +73,8 @@ def setting():
|
|||
new_email = change_email_form.email.data
|
||||
|
||||
# check if this email is not already used
|
||||
if (
|
||||
personal_email_already_used(new_email)
|
||||
or Alias.get_by(email=new_email)
|
||||
or DeletedAlias.get_by(email=new_email)
|
||||
if personal_email_already_used(new_email) or Alias.get_by(
|
||||
email=new_email
|
||||
):
|
||||
flash(f"Email {new_email} already used", "error")
|
||||
elif not email_domain_can_be_used_as_mailbox(new_email):
|
||||
|
|
Loading…
Reference in a new issue