From 16664f5d4a3a3c8fd487a878a86e88240d9ed834 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 3 Aug 2021 08:19:33 +0200 Subject: [PATCH] fdfd --- drama/routes/votes.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drama/routes/votes.py b/drama/routes/votes.py index aed31e04e..e14423695 100644 --- a/drama/routes/votes.py +++ b/drama/routes/votes.py @@ -13,10 +13,11 @@ def admin_vote_info_get(v): link = request.args.get("link") if not link: return render_template("votes.html", v=v) - - if "t2_" in link: thing = get_post(int(link.split("t2_")[1]), v=v) - elif "t3_" in link: thing = get_comment(int(link.split("t3_")[1]), v=v) - else: abort(400) + try: + if "t2_" in link: thing = get_post(int(link.split("t2_")[1]), v=v) + elif "t3_" in link: thing = get_comment(int(link.split("t3_")[1]), v=v) + else: abort(400) + except: abort(400) if isinstance(thing, Submission):