Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ychiucco committed Feb 4, 2025
1 parent eb57e63 commit f18111b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fractal_server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ def assert_key(key: str):
)
else:
try:
(
decryped_password = (
Fernet(email_values["FRACTAL_EMAIL_PASSWORD_KEY"])
.decrypt(email_values["FRACTAL_EMAIL_PASSWORD"])
.decode("utf-8")
Expand All @@ -660,12 +660,15 @@ def assert_key(key: str):
"Invalid FRACTAL_EMAIL_PASSWORD_KEY. "
f"Original error: '{e}'."
)
else:
decryped_password = None

values["FRACTAL_EMAIL_SETTINGS"] = MailSettings(
sender=email_values["FRACTAL_EMAIL_SENDER"],
recipients=email_values["FRACTAL_EMAIL_RECIPIENTS"].split(","),
smtp_server=email_values["FRACTAL_EMAIL_SMTP_SERVER"],
port=email_values["FRACTAL_EMAIL_SMTP_PORT"],
password=email_values["FRACTAL_EMAIL_SENDER"],
password=decryped_password,
instance_name=email_values["FRACTAL_EMAIL_INSTANCE_NAME"],
use_starttls=email_values.get(
"FRACTAL_EMAIL_USE_STARTTLS", True
Expand Down

0 comments on commit f18111b

Please sign in to comment.