From 74c5059aba7381aaa81d9dcc36f51d12395e18a7 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Thu, 23 Oct 2025 12:13:34 -0500 Subject: [PATCH] CLAUDE: Fix player drops going to wrong team (DENIL id 503 instead of FA id 498) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed critical bug where player drops/releases were assigned to team id 503 (DENIL) instead of the correct Free Agency team (id 498). The transaction_builder.py had a hardcoded team ID instead of using the config value. **Root Cause:** - Line 446 in services/transaction_builder.py hardcoded `id=503` for Free Agency - Correct Free Agency team ID is 498 (from config.free_agent_team_id) - Team 503 is DENIL, causing dropped players to appear on wrong roster **Fix:** - Changed to use `config.free_agent_team_id` (498) dynamically - All drop/release transactions now correctly target Free Agency **Affected Players in Production:** - Luis Torrens, Jake Meyers, Lance Lynn, Seranthony Dominguez - These players need manual correction in production database **Testing:** - All 31 transaction_builder tests pass - Validates correct team assignment for drop operations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- services/transaction_builder.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/transaction_builder.py b/services/transaction_builder.py index a223c0e..495f546 100644 --- a/services/transaction_builder.py +++ b/services/transaction_builder.py @@ -441,11 +441,12 @@ class TransactionBuilder: transactions = [] move_id = f"Season-{self.season:03d}-Week-{week:02d}-{int(self.created_at.timestamp())}" - # Create FA team for drops + # Create FA team for drops using config value + config = get_config() fa_team = Team( - id=503, # Standard FA team ID + id=config.free_agent_team_id, # Correct FA team ID from config (498) abbrev="FA", - sname="Free Agents", + sname="Free Agents", lname="Free Agency", season=self.season ) # type: ignore