Skip to content

Commit

Permalink
fix validators mails
Browse files Browse the repository at this point in the history
  • Loading branch information
joelclems committed Jun 12, 2023
1 parent 5c7fdd8 commit d788bc5
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions backend/geonature/core/users/register_post_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@


def validators_emails():
return (
current_app.config["ACCOUNT_MANAGEMENT"]["VALIDATOR_EMAIL"]
.replace(" ", "")
.replace("\n", "")
.split(",")
)
"""
On souhaite récupérer une liste de mails
"""
emails = current_app.config["ACCOUNT_MANAGEMENT"]["VALIDATOR_EMAIL"]
return emails if isinstance(emails, list) else [emails]


def validate_temp_user(data):
Expand Down Expand Up @@ -162,9 +161,6 @@ def inform_user(user):
)
subject = f"Confirmation inscription {app_name}"
recipients = [user["email"]]
# dans le cas ou on a plusieurs validateurs et on veut prévenir tout le monde
# de la validation du compte ????????
# recipients + validators_emails()
send_mail(recipients, subject, msg_html)


Expand Down

0 comments on commit d788bc5

Please sign in to comment.