|
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m18s
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>
|
||
|---|---|---|
| .. | ||
| routers_v3 | ||
| services | ||
| __init__.py | ||
| db_engine.py | ||
| dependencies.py | ||
| main.py | ||