mirror of https://gitlab.com/litecord/litecord.git
channels: handle when chan_type is None
This commit is contained in:
parent
948627efd1
commit
9d81bef527
|
|
@ -194,6 +194,9 @@ async def close_channel(channel_id):
|
||||||
user_id = await token_check()
|
user_id = await token_check()
|
||||||
|
|
||||||
chan_type = await app.storage.get_chan_type(channel_id)
|
chan_type = await app.storage.get_chan_type(channel_id)
|
||||||
|
if chan_type is None:
|
||||||
|
raise ChannelNotFound("Channel not found")
|
||||||
|
|
||||||
ctype = ChannelType(chan_type)
|
ctype = ChannelType(chan_type)
|
||||||
|
|
||||||
if ctype in GUILD_CHANS:
|
if ctype in GUILD_CHANS:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue