fix: use player_id instead of key_bbref in create_pit_position() (#7) #38

Merged
Claude merged 2 commits from ai/paper-dynasty-card-creation#7 into main 2026-03-23 03:50:39 +00:00

2 Commits

Author SHA1 Message Date
5e135ff554 Merge branch 'main' into ai/paper-dynasty-card-creation#7 2026-03-23 03:50:35 +00:00
Cal Corum
1d96223c78 fix: use player_id instead of key_bbref in create_pit_position() (#7)
Closes #7

The fallback branch of create_pit_position() used `int(df_data["key_bbref"])`
which always raises ValueError for string IDs like 'verlaju01'. The exception
was silently swallowed, causing pitchers without defensive stats to receive no
position record at all.

Fix: use `int(float(df_data["player_id"]))` to match the pattern used in
create_pitching_card() on the same file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 23:03:43 -05:00