forked from Github-Mirrors/canaille
refactor: PEP20 flat is better than nested
This commit is contained in:
parent
b0e38b6f71
commit
6fa86cb5b2
1 changed files with 38 additions and 33 deletions
|
@ -6,7 +6,12 @@ from canaille.core.mails import send_compromised_password_check_failure_mail
|
||||||
|
|
||||||
|
|
||||||
def check_if_send_mail_to_admins(form, api_url, hashed_password_suffix):
|
def check_if_send_mail_to_admins(form, api_url, hashed_password_suffix):
|
||||||
if current_app.features.has_smtp and current_app.config["CANAILLE"]["ADMIN_EMAIL"]:
|
if (
|
||||||
|
not current_app.features.has_smtp
|
||||||
|
or not current_app.config["CANAILLE"]["ADMIN_EMAIL"]
|
||||||
|
):
|
||||||
|
return
|
||||||
|
|
||||||
flash(
|
flash(
|
||||||
_(
|
_(
|
||||||
"Password compromise investigation failed. "
|
"Password compromise investigation failed. "
|
||||||
|
|
Loading…
Reference in a new issue