Skip to content

Commit

Permalink
fix: Category NoneType
Browse files Browse the repository at this point in the history
  • Loading branch information
1ukastesar authored and solumath committed Sep 30, 2024
1 parent 5919c64 commit 69135b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cogs/fitwide/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,11 @@ async def on_guild_channel_update(
self, before: disnake.abc.GuildChannel, after: disnake.abc.GuildChannel
) -> None:
"""Update teacher info channel on permissions change"""
if before.overwrites != after.overwrites and after.category.name in features.CATEGORIES_NAMES:
if (
before.overwrites != after.overwrites
and after.category is not None
and after.category.name in features.CATEGORIES_NAMES
):
perms_list_before, perms_list_after = await features.update_teacher_info(
after, self.teacher_info_channel
)
Expand Down

0 comments on commit 69135b6

Please sign in to comment.