Paper Dynasty Database - PostgreSQL database service
When no position filters are applied, `final_players` is a lazy Peewee queryset with `ORDER BY RANDOM() LIMIT n`. Iterating it twice (once to build player_ids, once for the response loop) executes two separate DB queries with different random seeds, causing dex_by_player to be built for a different player set than returned, silently producing empty paperdex for all players. Add `final_players = list(final_players)` before building player_ids to ensure both iterations operate on the same materialized result. Also fix pre-existing syntax error in import statement and minor ruff lint issues in the same file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .gitea/workflows | ||
| app | ||
| docs | ||
| migrations | ||
| scripts | ||
| storage/templates | ||
| .dockerignore | ||
| .env | ||
| .env.example | ||
| .gitignore | ||
| CLAUDE.md | ||
| compose.production.yml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| requirements.txt | ||
| VERSION | ||