CLAUDE: Fix Event ID 9 gauntlet UnboundLocalError for team_id variable

When a gauntlet game ended for Event ID 9, the post_result function would crash with:
"UnboundLocalError: cannot access local variable 'team_id' where it is not associated with a value"

Event ID 9 was missing team_id initialization, while all other events (3,4,5,6,7,8)
properly set team_id. Added team_id = None to match the pattern used by Events 5, 6, and 8.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2025-11-11 12:57:12 -06:00
parent fb8450f2d2
commit 5d841419b0

View File

@ -1944,6 +1944,7 @@ async def post_result(run_id: int, is_win: bool, this_team: Team, bot, channel,
cardset_id = 25
elif this_event['id'] == 9:
cardset_id = 27
team_id = None
if x['reward']['pack_type']['id'] == 9:
cardset_id = 26
await db_post(