From 7dd8ac72290d3bb90d7c7294aa1355c344d0d47d Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Tue, 3 Mar 2026 15:22:08 -0600 Subject: [PATCH] store: Fix: Inverted TESTING env check in paper-dynasty-database dependencies.py --- ...ck-in-paper-dynasty-database-dep-650bab.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 graph/fixes/fix-inverted-testing-env-check-in-paper-dynasty-database-dep-650bab.md diff --git a/graph/fixes/fix-inverted-testing-env-check-in-paper-dynasty-database-dep-650bab.md b/graph/fixes/fix-inverted-testing-env-check-in-paper-dynasty-database-dep-650bab.md new file mode 100644 index 00000000000..81cdeec219d --- /dev/null +++ b/graph/fixes/fix-inverted-testing-env-check-in-paper-dynasty-database-dep-650bab.md @@ -0,0 +1,29 @@ +--- +id: 650babda-b99b-4017-92b7-692bada7669d +type: fix +title: "Fix: Inverted TESTING env check in paper-dynasty-database dependencies.py" +tags: [paper-dynasty-database, python, fastapi, env, fix, bug] +importance: 0.5 +confidence: 0.8 +created: "2026-03-03T21:22:08.248652+00:00" +updated: "2026-03-03T21:22:08.248652+00:00" +--- + +## Problem +`app/dependencies.py:33` had `if os.environ.get('TESTING') == 'False':` — inverted logic that only switched to the dev URL when TESTING was False. Also, `.env` had ` TESTING=TRUE` with a leading space, so the env var was never actually set (key was ` TESTING` not `TESTING`). + +## Root Cause +- Inverted string comparison (`'False'` instead of `'True'`) +- Leading space in `.env` key name silently prevented the var from loading + +## Solution +- `dependencies.py:33`: `== 'False'` → `== 'True'` +- `.env:64`: ` TESTING=TRUE` → `TESTING=True` (remove leading space, normalize case to match comparison) +- Updated `.env` comment from "Set to 'False'" to "Set to 'True'" + +## Files Changed +- `app/dependencies.py` +- `.env` + +## PR +https://git.manticorum.com/cal/paper-dynasty-database/pulls/40 (issue #23)