diff --git a/system-server/system_server/settings/settings.py b/system-server/system_server/settings/settings.py index 2a1800e8566..4094d7cb853 100644 --- a/system-server/system_server/settings/settings.py +++ b/system-server/system_server/settings/settings.py @@ -9,16 +9,13 @@ @lru_cache(maxsize=1) def get_settings() -> "SystemServerSettings": """Get the settings.""" - update_from_dotenv() - return SystemServerSettings() - - -def update_from_dotenv() -> None: - """Get the location of the settings file.""" env = Environment().dot_env_path if env: load_dotenv(env) + # Update the systemServer settings from env file + return SystemServerSettings(_env_file=env) + class Environment(BaseSettings): """Environment related settings."""