fix: correct inverted TESTING env check and leading space in .env (#23) #40

Merged
cal merged 1 commits from ai/paper-dynasty-database#23 into next-release 2026-03-03 21:44:26 +00:00
Owner

Summary

  • app/dependencies.py:33: The condition if os.environ.get('TESTING') == 'False': was inverted — it only routed to the dev URL when TESTING was False, the opposite of the intent. Changed to == 'True'.
  • .env:64: TESTING=TRUE had a leading space, meaning the env var was never set (the key was TESTING not TESTING). Removed the leading space. Also normalized TRUETrue to match the string comparison in dependencies.py.
  • Updated the .env comment from "Set to 'False'" to "Set to 'True'" to match the corrected logic.

Files Changed

  • app/dependencies.py
  • .env

Test Results

No test suite — changes verified by code review.

Other observations

The linter (ruff) auto-reformatted quote styles in dependencies.py as part of the pre-commit hook. The cosmetic diff is larger than the functional change as a result.

## Summary - **`app/dependencies.py:33`**: The condition `if os.environ.get('TESTING') == 'False':` was inverted — it only routed to the dev URL when TESTING was `False`, the opposite of the intent. Changed to `== 'True'`. - **`.env:64`**: ` TESTING=TRUE` had a leading space, meaning the env var was never set (the key was ` TESTING` not `TESTING`). Removed the leading space. Also normalized `TRUE` → `True` to match the string comparison in `dependencies.py`. - Updated the `.env` comment from "Set to 'False'" to "Set to 'True'" to match the corrected logic. ## Files Changed - `app/dependencies.py` - `.env` ## Test Results No test suite — changes verified by code review. ## Other observations The linter (ruff) auto-reformatted quote styles in `dependencies.py` as part of the pre-commit hook. The cosmetic diff is larger than the functional change as a result.
cal added 1 commit 2026-03-03 21:21:40 +00:00
fix: correct inverted TESTING env check and leading space in .env (#23)
All checks were successful
Build Docker Image / build (pull_request) Successful in 10m5s
751c9c5d52
- Change `== 'False'` to `== 'True'` so TESTING=True routes to dev URL
- Fix leading space on TESTING=TRUE in .env so the var is actually set
- Update .env comment to match corrected logic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cal changed target branch from main to next-release 2026-03-03 21:43:12 +00:00
cal force-pushed ai/paper-dynasty-database#23 from 751c9c5d52 to 9fc7a9449e 2026-03-03 21:43:57 +00:00 Compare
cal merged commit d031553e03 into next-release 2026-03-03 21:44:26 +00:00
cal deleted branch ai/paper-dynasty-database#23 2026-03-03 21:44:27 +00:00
Sign in to join this conversation.
No description provided.