From fa4a4138f0d430aee73030aa80523b787ddc37ab Mon Sep 17 00:00:00 2001 From: Luna Date: Wed, 29 Jul 2020 16:15:15 -0300 Subject: [PATCH] assert proper overwrite target data is set --- litecord/blueprints/channels.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litecord/blueprints/channels.py b/litecord/blueprints/channels.py index ff80c42..8b0f93a 100644 --- a/litecord/blueprints/channels.py +++ b/litecord/blueprints/channels.py @@ -397,13 +397,16 @@ async def _process_overwrites(guild_id: int, channel_id: int, overwrites: list) if target.is_user: perms = Permissions(overwrite["allow"] & ~overwrite["deny"]) + assert target.user_id is not None await _dispatch_action(guild_id, channel_id, target.user_id, perms) elif target.is_role: + assert target.role_id is not None user_ids.extend(await app.storage.get_role_members(target.role_id)) for user_id in user_ids: perms = await get_permissions(user_id, channel_id) + assert target.user_id is not None await _dispatch_action(guild_id, channel_id, target.user_id, perms)