From ab8bfa115f1bd6c6fb0c5f22ebf2c42aeabd1ee4 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Wed, 4 Feb 2026 21:50:43 -0600 Subject: [PATCH] Fix /injury roll command crash when player.team is None MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The search_players() API endpoint returns team as an ID only (not nested object), causing player.team to be None. Added null check before accessing team.thumbnail. Fixes AttributeError: 'NoneType' object has no attribute 'thumbnail' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- VERSION | 2 +- commands/injuries/management.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 19bce8c..2b99657 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.29.2 +2.29.3 diff --git a/commands/injuries/management.py b/commands/injuries/management.py index b76e4fd..6ca26f0 100644 --- a/commands/injuries/management.py +++ b/commands/injuries/management.py @@ -139,7 +139,7 @@ class InjuryGroup(app_commands.Group): embed = EmbedTemplate.warning( title=f"Injury roll for {interaction.user.name}" ) - if player.team.thumbnail is not None: + if player.team and player.team.thumbnail: embed.set_thumbnail(url=player.team.thumbnail) embed.add_field(