~homeworkprod/byceps

fc820ff5ee923bfd4367b02c3ab1ee3e8d1f4006 — Jochen Kupperschmidt a month ago 18cb217
Do not cache Marrow Mailer config dict
1 files changed, 2 insertions(+), 8 deletions(-)

M byceps/email.py
M byceps/email.py => byceps/email.py +2 -8
@@ 19,14 19,8 @@ from marrow.mailer import Mailer


def init_app(app: Flask) -> None:
    marrowmailer_config_key = 'MARROWMAILER_CONFIG'

    if marrowmailer_config_key not in app.config:
        app.config[marrowmailer_config_key] = _get_config(app)

    mailer_config = app.config.get(marrowmailer_config_key)

    app.marrowmailer = Mailer(mailer_config)
    config = _get_config(app)
    app.marrowmailer = Mailer(config)


def _get_config(app: Flask) -> dict[str, Any]: