major-domo-v2/tasks
Cal Corum 7370fa7006 CLAUDE: Fix draft channel configuration not persisting
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>
2025-10-24 22:52:57 -05:00
..
CLAUDE.md CLAUDE: Add comprehensive draft system documentation 2025-10-24 15:16:39 -05:00
custom_command_cleanup.py CLAUDE: Fix double emoji issue in Discord embeds 2025-10-16 23:09:21 -05:00
draft_monitor.py CLAUDE: Fix draft channel configuration not persisting 2025-10-24 22:52:57 -05:00
live_scorebug_tracker.py CLAUDE: Refactor scorebug display and add dynamic channel visibility 2025-10-22 16:58:21 -05:00
transaction_freeze.py CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00