paper-dynasty-database/app
Cal Corum c0f862636a fix(render): schedule image_url backfill on cache hits
The card render endpoint's file-on-disk cache short-circuit returned
FileResponse immediately when the cached PNG existed, bypassing the
backfill BackgroundTask that populates battingcard.image_url /
pitchingcard.image_url. If a variant row was later recreated with
image_url=NULL while the PNG was still cached, the DB column stayed
NULL forever, breaking every downstream consumer that reads image_url for
display.

Extract the backfill-scheduling logic into a _schedule_variant_image_backfill
helper and call it on both the cache-hit and full-render paths. The
helper's internal guards (variant > 0, tier is None, row exists with
NULL image_url) keep the happy-path cache hit a no-op.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 10:12:23 -05:00
..
models refactor: split PlayerSeasonStats into BattingSeasonStats and PitchingSeasonStats 2026-03-17 09:43:22 -05:00
routers_v2 fix(render): schedule image_url backfill on cache hits 2026-04-11 10:12:23 -05:00
seed refactor: rename evolution system to refractor 2026-03-23 13:31:55 -05:00
services feat: S3 upload pipeline for APNG animated cards (#198) 2026-04-08 10:04:21 -05:00
__init__.py Initial Commit with /current 2023-09-13 14:44:26 -05:00
card_creation.py Update card_creation.py 2024-02-24 21:36:44 -06:00
db_engine.py feat: add REFRACTOR_START_SEASON floor to evaluator queries (#195) 2026-04-08 08:03:07 -05:00
db_helpers.py Fix PostgreSQL upsert column names and CSV null handling 2026-01-30 17:28:40 -06:00
dependencies.py fix: use constant-time comparison for bearer token validation (#8) 2026-03-05 03:43:59 +00:00
main.py refactor: rename evolution system to refractor 2026-03-23 13:31:55 -05:00
player_scouting.py Update player_scouting.py 2023-09-24 19:00:21 -05:00