From ea850c9ae2bbfb39ab9cef149e4d19cc8bb2ea46 Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Wed, 22 Jun 2022 11:45:37 +0100 Subject: [PATCH] Added defaults for config keys to avoid exceptions --- ref-test/app/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ref-test/app/config.py b/ref-test/app/config.py index c965410..0d1ac88 100644 --- a/ref-test/app/config.py +++ b/ref-test/app/config.py @@ -15,16 +15,16 @@ class Config(object): SQLALCHEMY_TRACK_MODIFICATIONS = False MAIL_SERVER = os.getenv('MAIL_SERVER') - MAIL_PORT = int(os.getenv('MAIL_PORT')) + MAIL_PORT = int(os.getenv('MAIL_PORT') or 25) MAIL_USE_TLS = False MAIL_USE_SSL = False MAIL_DEBUG = False MAIL_USERNAME = os.getenv('MAIL_USERNAME') MAIL_PASSWORD = os.getenv('MAIL_PASSWORD') MAIL_DEFAULT_SENDER = os.getenv('MAIL_DEFAULT_SENDER') - MAIL_MAX_EMAILS = int(os.getenv('MAIL_MAX_EMAILS')) + MAIL_MAX_EMAILS = int(os.getenv('MAIL_MAX_EMAILS') or 25) MAIL_SUPPRESS_SEND = False - MAIL_ASCII_ATTACHMENTS = bool(os.getenv('MAIL_ASCII_ATTACHMENTS')) + MAIL_ASCII_ATTACHMENTS = bool(os.getenv('MAIL_ASCII_ATTACHMENTS') or True) class Production(Config): pass