revert temp changes to config.py

This commit is contained in:
Daniel Roth 2026-02-24 16:10:53 +00:00
parent b9640d1894
commit 5c9a8b55f2

View file

@ -1,6 +1,5 @@
import os import os
from functools import lru_cache from functools import lru_cache
from pathlib import Path
from pydantic_settings import BaseSettings, SettingsConfigDict from pydantic_settings import BaseSettings, SettingsConfigDict
from typing import Optional from typing import Optional
@ -9,16 +8,12 @@ def resolve_env_file() -> Optional[str]:
env = os.getenv("ENVIRONMENT", "local") env = os.getenv("ENVIRONMENT", "local")
if env == "local": if env == "local":
env_file: Path = Path("backend/.env").resolve() # resolve to full path return "backend/.env"
print("USING ENV FILE:", env_file)
return str(env_file)
if env == "test": if env == "test":
env_file: Path = Path("backend/.env.test").resolve() return "backend/.env.test"
print("USING ENV FILE:", env_file)
return str(env_file)
print("NO ENV FILE") # prod = no env file
return None return None