store: Fix: Inverted TESTING env check in paper-dynasty-database dependencies.py
This commit is contained in:
parent
69bdd0b0e3
commit
7dd8ac7229
@ -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)
|
||||
Loading…
Reference in New Issue
Block a user