fix: Respect short_output parameter in player search endpoint #6

Merged
cal merged 2 commits from fix/player-search-respect-short-output into main 2026-02-06 02:11:23 +00:00
Owner

The search_players() method was hardcoding short_output=True when
converting query results to dicts, ignoring the function parameter.
This caused the /api/v3/players/search endpoint to always return
team_id as an integer instead of nested team objects, even when
short_output=False was specified.

Impact:

  • Discord bot's /injury clear command was crashing because
    player.team was None (only team_id was populated)
  • Any code using search endpoint couldn't get full team data

Fix:

  • Changed line 386 to use the short_output parameter value
  • Now respects short_output parameter: False returns full team
    objects, True returns just team IDs

Root cause analysis from production logs:

  • Error: AttributeError: 'NoneType' object has no attribute 'roster_type'
  • Location: commands/injuries/management.py:647
  • Cause: player.team was None after search_players() call

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

The search_players() method was hardcoding short_output=True when converting query results to dicts, ignoring the function parameter. This caused the /api/v3/players/search endpoint to always return team_id as an integer instead of nested team objects, even when short_output=False was specified. Impact: - Discord bot's /injury clear command was crashing because player.team was None (only team_id was populated) - Any code using search endpoint couldn't get full team data Fix: - Changed line 386 to use the short_output parameter value - Now respects short_output parameter: False returns full team objects, True returns just team IDs Root cause analysis from production logs: - Error: AttributeError: 'NoneType' object has no attribute 'roster_type' - Location: commands/injuries/management.py:647 - Cause: player.team was None after search_players() call Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
cal added 1 commit 2026-02-06 02:07:15 +00:00
fix: Respect short_output parameter in player search endpoint
Some checks failed
Build Docker Image / build (pull_request) Failing after 15s
39bc99b0dd
The search_players() method was hardcoding short_output=True when
converting query results to dicts, ignoring the function parameter.
This caused the /api/v3/players/search endpoint to always return
team_id as an integer instead of nested team objects, even when
short_output=False was specified.

Impact:
- Discord bot's /injury clear command was crashing because
  player.team was None (only team_id was populated)
- Any code using search endpoint couldn't get full team data

Fix:
- Changed line 386 to use the short_output parameter value
- Now respects short_output parameter: False returns full team
  objects, True returns just team IDs

Root cause analysis from production logs:
- Error: AttributeError: 'NoneType' object has no attribute 'roster_type'
- Location: commands/injuries/management.py:647
- Cause: player.team was None after search_players() call

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
cal added 1 commit 2026-02-06 02:08:05 +00:00
Update VERSION
All checks were successful
Build Docker Image / build (pull_request) Successful in 3m2s
1216bec287
cal merged commit 70f1918484 into main 2026-02-06 02:11:23 +00:00
cal deleted branch fix/player-search-respect-short-output 2026-02-06 02:11:23 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 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/major-domo-database#6
No description provided.