aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-09-21 22:15:47 -0400
committerRapptz <[email protected]>2017-09-21 22:15:47 -0400
commit458cb83b47cb903ff1e16b96c129501afdd8278e (patch)
tree8148db4e94268d0c8f62bcac8959b95df2278f81
parentFix header size warnings. (diff)
downloaddiscord.py-458cb83b47cb903ff1e16b96c129501afdd8278e.tar.xz
discord.py-458cb83b47cb903ff1e16b96c129501afdd8278e.zip
Properly handle cases where a category is removed.
-rw-r--r--discord/abc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/abc.py b/discord/abc.py
index b7cd26ef..e836dda3 100644
--- a/discord/abc.py
+++ b/discord/abc.py
@@ -222,7 +222,7 @@ class GuildChannel:
yield from http.bulk_channel_update(self.guild.id, payload, reason=reason)
self.position = position
if parent_id is not _undefined:
- self.category_id = int(parent_id)
+ self.category_id = int(parent_id) if parent_id else None
@asyncio.coroutine
def _edit(self, options, reason):