From fac9f66b3ea40adcedf2f1aa073314d1f084d73f Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Mon, 6 Apr 2026 00:00:12 -0500 Subject: [PATCH 1/2] docs: fix dev PostgreSQL container/db/user in CLAUDE.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dev environment uses sba_postgres container, paperdynasty_dev database, sba_admin user — not pd_postgres/pd_master as previously documented. Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index e57b6ed..f3c3426 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -31,7 +31,7 @@ docker build -t paper-dynasty-db . # Build image | **URL** | pddev.manticorum.com | pd.manticorum.com | | **Host** | `ssh pd-database` | `ssh akamai` → `/root/container-data/paper-dynasty` | | **API container** | `dev_pd_database` | `pd_api` | -| **PostgreSQL** | `pd_postgres` (port 5432) | `pd_postgres` | +| **PostgreSQL** | `sba_postgres` / `paperdynasty_dev` / `sba_admin` | `pd_postgres` / `pd_master` | | **Adminer** | port 8081 | — | | **API port** | 816 | 815 | | **Image** | `manticorum67/paper-dynasty-database` | `manticorum67/paper-dynasty-database` | From 543c8cddf6b8ccb7c2843e8e5d463d8506300b2f Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Mon, 6 Apr 2026 01:34:04 -0500 Subject: [PATCH 2/2] fix: ensure count is never null in GET /refractor/cards (#183) Guards against Peewee 3.17.9 returning None from .count() on a complex multi-join query when 0 rows match the filter set. Closes #183 Co-Authored-By: Claude Sonnet 4.6 --- app/routers_v2/refractor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routers_v2/refractor.py b/app/routers_v2/refractor.py index ba9c4c5..c74ba8b 100644 --- a/app/routers_v2/refractor.py +++ b/app/routers_v2/refractor.py @@ -211,7 +211,7 @@ async def list_card_states( if evaluated_only: query = query.where(RefractorCardState.last_evaluated_at.is_null(False)) - total = query.count() + total = query.count() or 0 items = [] for state in query.offset(offset).limit(limit): player_name = None