From 8006e73719d844c535fa22098615da12f2666e5b Mon Sep 17 00:00:00 2001 From: Robert Rosca <32569096+RobertRosca@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:45:22 +0200 Subject: [PATCH] fix(settings): fix settings initialisation --- src/zulip_write_only_proxy/main.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/zulip_write_only_proxy/main.py b/src/zulip_write_only_proxy/main.py index 1a606b0f..7033fcc0 100644 --- a/src/zulip_write_only_proxy/main.py +++ b/src/zulip_write_only_proxy/main.py @@ -8,9 +8,8 @@ def create_app(): from . import routers, services from ._logging import RequestLoggingMiddleware from .settings import configure as configure_settings - from .settings import settings - configure_settings() + settings = configure_settings() @asynccontextmanager async def lifespan(app: fastapi.FastAPI): @@ -91,9 +90,8 @@ def get_trusted_hosts(logger): # pragma: no cover from . import _logging, get_logger from .settings import configure as configure_settings - from .settings import settings - configure_settings() + settings = configure_settings() _logging.configure(settings.debug, add_call_site_parameters=False)