claude-memory/graph/fixes/fix-inverted-testing-env-check-in-paper-dynasty-database-dep-650bab.md

1.6 KiB

id type title tags importance confidence created updated relations
650babda-b99b-4017-92b7-692bada7669d fix Fix: Inverted TESTING env check in paper-dynasty-database dependencies.py
paper-dynasty-database
python
fastapi
env
fix
bug
0.5 0.8 2026-03-03T21:22:08.248652+00:00 2026-03-03T21:22:09.788800+00:00
target type direction strength edge_id
04e57a23-0a20-49d6-8c5a-2fa5fc4e55b5 RELATED_TO outgoing 0.72 d2bdb6b1-395e-4740-a402-b588331b72ba
target type direction strength edge_id
1e6628fa-dc5d-4047-a9ae-ecb884e04ba2 RELATED_TO outgoing 0.72 7f2a9e26-50c9-4191-8372-14807b170e0e
target type direction strength edge_id
d36a86f0-8183-4c94-8d63-0be65d3fd63a RELATED_TO outgoing 0.71 dd92b372-5e87-4cfe-9e5c-f97b09c0104b

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=TRUETESTING=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

cal/paper-dynasty-database#40 (issue #23)