From 5aa88e4e3dd003e33998e03c49b7c887f8376ce8 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Sun, 4 Jan 2026 16:20:05 -0600 Subject: [PATCH] Fix Athletics Team Choice pack KeyError MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- VERSION | 2 +- constants.py | 2 ++ discord_ui/selectors.py | 1 + helpers/constants.py | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index f65dc1e..a412349 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.9 +1.7.10 diff --git a/constants.py b/constants.py index 042bbcb..ee75f73 100644 --- a/constants.py +++ b/constants.py @@ -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', diff --git a/discord_ui/selectors.py b/discord_ui/selectors.py index 2f344fe..5151db9 100644 --- a/discord_ui/selectors.py +++ b/discord_ui/selectors.py @@ -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, diff --git a/helpers/constants.py b/helpers/constants.py index 129e4f7..df3bcc1 100644 --- a/helpers/constants.py +++ b/helpers/constants.py @@ -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',