fix: /teams/{id}/evolutions response missing player_name #115

Closed
opened 2026-03-19 16:37:40 +00:00 by cal · 1 comment
Owner

Description

GET /api/v2/teams/{team_id}/evolutions returns evolution card states without player_name. The Discord bot's /evo status command falls back to displaying "Player #795" instead of "Tyler Wells".

Current Response

{
  "player_id": 795,
  "team_id": 31,
  "current_tier": 1,
  "current_value": 5.0,
  ...
}

Expected

{
  "player_id": 795,
  "player_name": "Tyler Wells",
  "team_id": 31,
  "current_tier": 1,
  "current_value": 5.0,
  ...
}

Fix

JOIN the player table in the evolutions query and include p_name in the serialized response.

Found during

Phase 1 smoke testing (2026-03-19)

## Description `GET /api/v2/teams/{team_id}/evolutions` returns evolution card states without `player_name`. The Discord bot's `/evo status` command falls back to displaying "Player #795" instead of "Tyler Wells". ## Current Response ```json { "player_id": 795, "team_id": 31, "current_tier": 1, "current_value": 5.0, ... } ``` ## Expected ```json { "player_id": 795, "player_name": "Tyler Wells", "team_id": 31, "current_tier": 1, "current_value": 5.0, ... } ``` ## Fix JOIN the `player` table in the evolutions query and include `p_name` in the serialized response. ## Found during Phase 1 smoke testing (2026-03-19)
Claude added the
ai-working
label 2026-03-19 18:01:02 +00:00
Claude removed the
ai-working
label 2026-03-19 18:03:53 +00:00
Collaborator

PR opened: #119

Fix: joined the Player table in list_team_evolutions (.switch(EvolutionCardState).join(Player)) and added player_name to each serialized item. Single query, no N+1.

PR opened: https://git.manticorum.com/cal/paper-dynasty-database/pulls/119 Fix: joined the `Player` table in `list_team_evolutions` (`.switch(EvolutionCardState).join(Player)`) and added `player_name` to each serialized item. Single query, no N+1.
Claude added the
ai-pr-opened
label 2026-03-19 18:03:59 +00:00
cal closed this issue 2026-03-19 18:20:22 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-database#115
No description provided.