Major Domo Database - PostgreSQL database service for SBA bot
|
Some checks failed
Build Docker Image / build (pull_request) Has been cancelled
CRITICAL BUG FIX - Root cause of Player.data AttributeError
Problem:
The PATCH endpoint was calling locals() AFTER creating data = {}, causing
locals_dict to capture 'data' and 'locals_dict' as variables. The loop then
added these to the data dict itself, resulting in:
data = {'team_id': 549, 'demotion_week': 7, 'data': {}, 'locals_dict': {...}}
When Peewee executed Player.update(**data), it tried to set Player.data = {},
but Player model has no 'data' field, causing AttributeError.
Solution:
1. Call locals() BEFORE creating data dict
2. Exclude 'locals_dict' from the filter (along with 'player_id', 'token')
This ensures only actual player field parameters are included in the update.
Version: 2.5.2 → 2.5.3
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
||
|---|---|---|
| .claude | ||
| .gitea/workflows | ||
| app | ||
| migrations | ||
| scripts | ||
| test-storage | ||
| tests | ||
| .dockerignore | ||
| .env | ||
| .gitignore | ||
| =2.9.0 | ||
| CLAUDE.md | ||
| data_consistency_check.py | ||
| DATA_CONSISTENCY_REPORT.md | ||
| db_engine.py | ||
| deploy.sh | ||
| docker-compose.yml | ||
| Dockerfile | ||
| Dockerfile.optimized | ||
| GITEA_ACTIONS_SETUP.md | ||
| LICENSE | ||
| main.py | ||
| migrations.py | ||
| pd_master.db | ||
| pytest.ini | ||
| REFACTOR_DOCUMENTATION.md | ||
| requirements.txt | ||
| VERSION | ||