From b8735d4082a6b3adf725e508863e4a941b1bb1d0 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Tue, 9 Oct 2018 21:23:53 +0000 Subject: [PATCH] Abort 404 if dbguild not here --- webapp/titanembeds/blueprints/embed/embed.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webapp/titanembeds/blueprints/embed/embed.py b/webapp/titanembeds/blueprints/embed/embed.py index 3566339..870f921 100644 --- a/webapp/titanembeds/blueprints/embed/embed.py +++ b/webapp/titanembeds/blueprints/embed/embed.py @@ -66,6 +66,8 @@ def guild_embed(guild_id): if check_guild_existance(guild_id): guild = redisqueue.get_guild(guild_id) dbguild = db.session.query(Guilds).filter(Guilds.guild_id == guild_id).first() + if not dbguild: + abort(404) guild_dict = { "id": guild["id"], "name": guild["name"],