umar-30 Claude Opus 4.5 commited on
Commit
2db1eff
·
1 Parent(s): 2ac2730

Fix DATABASE_URL whitespace handling

Browse files

Strip whitespace from DATABASE_URL to handle env vars with leading/trailing spaces.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. app/config.py +1 -1
app/config.py CHANGED
@@ -71,7 +71,7 @@ class Settings:
71
  # Load .env file for local development
72
  _load_dotenv()
73
 
74
- database_url = os.getenv("DATABASE_URL")
75
  # Support both OPENROUTE_API_KEY and OPENROUTER_API_KEY
76
  openrouter_api_key = os.getenv("OPENROUTE_API_KEY") or os.getenv("OPENROUTER_API_KEY")
77
  openrouter_base_url = os.getenv("OPENROUTER_BASE_URL", "https://openrouter.ai/api/v1")
 
71
  # Load .env file for local development
72
  _load_dotenv()
73
 
74
+ database_url = os.getenv("DATABASE_URL", "").strip()
75
  # Support both OPENROUTE_API_KEY and OPENROUTER_API_KEY
76
  openrouter_api_key = os.getenv("OPENROUTE_API_KEY") or os.getenv("OPENROUTER_API_KEY")
77
  openrouter_base_url = os.getenv("OPENROUTER_BASE_URL", "https://openrouter.ai/api/v1")