CLAUDE: Fix player drops going to wrong team (DENIL id 503 instead of FA id 498)
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 <noreply@anthropic.com>
This commit is contained in:
parent
d7dc9ed2bf
commit
74c5059aba
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user