From 0eccf157505ec777f430e6ca9dff023b7bafeb39 Mon Sep 17 00:00:00 2001 From: Visual Date: Mon, 30 Mar 2020 17:14:43 +0000 Subject: [PATCH] Fixed broken check --- litecord/blueprints/icons.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/litecord/blueprints/icons.py b/litecord/blueprints/icons.py index a01509e..ef38700 100644 --- a/litecord/blueprints/icons.py +++ b/litecord/blueprints/icons.py @@ -31,7 +31,7 @@ async def send_icon(scope, key, icon_hash, **kwargs): """Send an icon.""" icon = await app.icons.generic_get(scope, key, icon_hash, **kwargs) - if not icon: + if icon is None: return "", 404 return await send_file(icon.as_path) @@ -44,8 +44,6 @@ def splitext_(filepath): @bp.route("/emojis/", methods=["GET"]) async def _get_raw_emoji(emoji_file): - # emoji = app.icons.get_emoji(emoji_id, ext=ext) - # just a test file for now emoji_id, ext = splitext_(emoji_file) return await send_icon("emoji", emoji_id, None, ext=ext) @@ -110,3 +108,4 @@ async def _get_guild_splash(guild_id: int, icon_file: str): async def _get_guild_banner(guild_id: int, icon_file: str): icon_hash, ext = splitext_(icon_file) return await send_icon("banner", guild_id, icon_hash, ext=ext) +