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