major-domo-database/app
Cal Corum f13815a162
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m18s
fix: Resolve Player.data AttributeError in patch_player endpoint
Fixes critical bug where IL moves and team reassignments failed with:
  "type object 'Player' has no attribute 'data'"

Root Cause:
- model_to_dict() with recurse=True attempted to serialize foreign keys
- Peewee internal serialization incorrectly accessed Player.data class attribute

Changes:
- Add backrefs=False to model_to_dict() to prevent circular reference issues
- Add comprehensive exception handling with graceful fallback
- Fallback chain: recursive → non-recursive → basic dict conversion
- Add warning/error logging to track serialization failures

Impact:
- Fixes /ilmove command failures (player team updates)
- Prevents PATCH /api/v3/players/{id} endpoint errors
- Maintains backward compatibility with all response formats

Version: 2.5.1 → 2.5.2

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-04 14:41:16 -06:00
..
routers_v3 feat: Add pagination support to /players endpoint 2026-02-04 14:01:01 -06:00
services fix: Resolve Player.data AttributeError in patch_player endpoint 2026-02-04 14:41:16 -06:00
__init__.py Initial commit 2023-03-21 16:09:46 -05:00
db_engine.py Add salary_cap column to Team model (v2.2.0) 2025-12-10 07:28:16 -06:00
dependencies.py Add CACHE_ENABLED env var to toggle Redis caching (v2.2.1) 2025-12-10 07:59:54 -06:00
main.py Added HelpCommands 2025-10-17 16:36:40 -05:00