major-domo-database/app/services
Cal Corum 39bc99b0dd
Some checks failed
Build Docker Image / build (pull_request) Failing after 15s
fix: Respect short_output parameter in player search endpoint
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>
2026-02-05 19:43:50 -06:00
..
__init__.py refactor: Extract services layer for testability 2026-02-03 15:38:34 +00:00
base.py Fix linting and formatting issues 2026-02-04 08:44:12 -06:00
interfaces.py fix: Complete dependency injection for PlayerService 2026-02-03 16:49:50 +00:00
mocks.py fix: Complete dependency injection refactor and restore caching 2026-02-04 01:13:46 -06:00
player_service.py fix: Respect short_output parameter in player search endpoint 2026-02-05 19:43:50 -06:00
team_service.py Fix linting and formatting issues 2026-02-04 08:44:12 -06:00