Fix Athletics Team Choice pack KeyError
Add 'Athletics' alias to ALL_MLB_TEAMS, IMAGES['mvp'], and AL_TEAM_IDS
to support both old franchise name ("Oakland Athletics") and new mlbclub
name ("Athletics") after the team's relocation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
c3054971eb
commit
5aa88e4e3d
@ -115,6 +115,7 @@ ALL_MLB_TEAMS = {
|
||||
'New York Mets': ['NYM', 'Mets'],
|
||||
'New York Yankees': ['NYY', 'Yankees'],
|
||||
'Oakland Athletics': ['OAK', 'Athletics'],
|
||||
'Athletics': ['OAK', 'Athletics'], # Alias for post-Oakland move
|
||||
'Philadelphia Phillies': ['PHI', 'Phillies'],
|
||||
'Pittsburgh Pirates': ['PIT', 'Pirates'],
|
||||
'San Diego Padres': ['SDP', 'Padres'],
|
||||
@ -157,6 +158,7 @@ IMAGES = {
|
||||
'New York Mets': f'{PD_IMAGE_BUCKET}/mvp/new-york-mets.gif',
|
||||
'New York Yankees': f'{PD_IMAGE_BUCKET}/mvp/new-york-yankees.gif',
|
||||
'Oakland Athletics': f'{PD_IMAGE_BUCKET}/mvp/oakland-athletics.gif',
|
||||
'Athletics': f'{PD_IMAGE_BUCKET}/mvp/oakland-athletics.gif', # Alias for post-Oakland move
|
||||
'Philadelphia Phillies': f'{PD_IMAGE_BUCKET}/mvp/philadelphia-phillies.gif',
|
||||
'Pittsburgh Pirates': f'{PD_IMAGE_BUCKET}/mvp/pittsburgh-pirates.gif',
|
||||
'San Diego Padres': f'{PD_IMAGE_BUCKET}/mvp/san-diego-padres.gif',
|
||||
|
||||
@ -23,6 +23,7 @@ AL_TEAM_IDS = {
|
||||
'Minnesota Twins': 17,
|
||||
'New York Yankees': 19,
|
||||
'Oakland Athletics': 20,
|
||||
'Athletics': 20, # Alias for post-Oakland move
|
||||
'Seattle Mariners': 24,
|
||||
'Tampa Bay Rays': 27,
|
||||
'Texas Rangers': 28,
|
||||
|
||||
@ -115,6 +115,7 @@ ALL_MLB_TEAMS = {
|
||||
'New York Mets': ['NYM', 'Mets'],
|
||||
'New York Yankees': ['NYY', 'Yankees'],
|
||||
'Oakland Athletics': ['OAK', 'Athletics'],
|
||||
'Athletics': ['OAK', 'Athletics'], # Alias for post-Oakland move
|
||||
'Philadelphia Phillies': ['PHI', 'Phillies'],
|
||||
'Pittsburgh Pirates': ['PIT', 'Pirates'],
|
||||
'San Diego Padres': ['SDP', 'Padres'],
|
||||
@ -157,6 +158,7 @@ IMAGES = {
|
||||
'New York Mets': f'{PD_IMAGE_BUCKET}/mvp/new-york-mets.gif',
|
||||
'New York Yankees': f'{PD_IMAGE_BUCKET}/mvp/new-york-yankees.gif',
|
||||
'Oakland Athletics': f'{PD_IMAGE_BUCKET}/mvp/oakland-athletics.gif',
|
||||
'Athletics': f'{PD_IMAGE_BUCKET}/mvp/oakland-athletics.gif', # Alias for post-Oakland move
|
||||
'Philadelphia Phillies': f'{PD_IMAGE_BUCKET}/mvp/philadelphia-phillies.gif',
|
||||
'Pittsburgh Pirates': f'{PD_IMAGE_BUCKET}/mvp/pittsburgh-pirates.gif',
|
||||
'San Diego Padres': f'{PD_IMAGE_BUCKET}/mvp/san-diego-padres.gif',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user