Root cause: Field naming mismatch between bot model and database schema. The database stores channel IDs in columns named 'result_channel' and 'ping_channel', but the bot's DraftData model incorrectly used 'result_channel_id' and 'ping_channel_id'. Additionally, the draft data PATCH endpoint requires query parameters instead of JSON body (like player, game, transaction, and injury endpoints). Changes: - models/draft_data.py: Renamed fields to match database schema - result_channel_id → result_channel - ping_channel_id → ping_channel - services/draft_service.py: Added use_query_params=True to PATCH calls - views/draft_views.py: Updated embed to use correct field names - tasks/draft_monitor.py: Updated channel lookups to use correct field names - tests/test_models.py: Updated test assertions to match new field names This fixes: - Channel configuration now saves correctly via /draft-admin channels - Ping channel settings persist across bot restarts - Result channel settings persist across bot restarts - All draft data updates work properly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| base.py | ||
| CLAUDE.md | ||
| common.py | ||
| confirmations.py | ||
| custom_commands.py | ||
| draft_views.py | ||
| embeds.py | ||
| help_commands.py | ||
| modals.py | ||
| players.py | ||
| trade_embed.py | ||
| transaction_embed.py | ||