Guard interaction.guild access in has_player_role #24

Closed
opened 2026-02-20 06:49:28 +00:00 by cal · 2 comments
Owner

Description

commands/injuries/management.py:57interaction.guild.roles is accessed without None guard. The outer @league_only() decorator does verify guild is not None, but has_player_role is a helper that could be called from other contexts without that guard.

File Locations

  • commands/injuries/management.py:57

Labels

bug

Priority

low

## Description `commands/injuries/management.py:57` — `interaction.guild.roles` is accessed without None guard. The outer `@league_only()` decorator does verify guild is not None, but `has_player_role` is a helper that could be called from other contexts without that guard. ## File Locations - `commands/injuries/management.py:57` ## Labels bug ## Priority low
Author
Owner

Addressed in commit f4be20a on next-release branch. Will be closed when merged to main.

Addressed in commit f4be20a on `next-release` branch. Will be closed when merged to main.
Author
Owner

Addressed in commit f4be20a on next-release branch. Will be closed when merged to main.

Addressed in commit `f4be20a` on `next-release` branch. Will be closed when merged to main.
cal closed this issue 2026-02-20 20:29:07 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/major-domo-v2#24
No description provided.