From e55b5ff63853f1ef489c1e74b6cc0d26f9e230ce Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 30 Aug 2024 11:15:02 -0500 Subject: If config variables are not set, return empty string. --- gn_auth/auth/authorisation/users/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gn_auth/auth/authorisation/users') diff --git a/gn_auth/auth/authorisation/users/views.py b/gn_auth/auth/authorisation/users/views.py index 2a6ff29..7adcd06 100644 --- a/gn_auth/auth/authorisation/users/views.py +++ b/gn_auth/auth/authorisation/users/views.py @@ -152,8 +152,8 @@ def send_verification_email( timedelta( minutes=expiration_minutes)).timestamp()) }) - send_message(smtp_user=current_app.config["SMTP_USER"], - smtp_passwd=current_app.config["SMTP_PASSWORD"], + send_message(smtp_user=current_app.config.get("SMTP_USER", ""), + smtp_passwd=current_app.config.get("SMTP_PASSWORD", ""), message=build_email_message( from_address=current_app.config["EMAIL_ADDRESS"], to_addresses=(user_address(user),), -- cgit v1.2.3