From 5d841419b00a5f707753980f385c2e95a2103259 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Tue, 11 Nov 2025 12:57:12 -0600 Subject: [PATCH] CLAUDE: Fix Event ID 9 gauntlet UnboundLocalError for team_id variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- gauntlets.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gauntlets.py b/gauntlets.py index 7186a7b..b1283fe 100644 --- a/gauntlets.py +++ b/gauntlets.py @@ -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(