From 26aa56cc4e67a5f7fecbc1c2d3aab8c2f7944308 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Tue, 27 Feb 2018 07:30:05 +0000 Subject: [PATCH] hotfix undefined variable for query --- webapp/titanembeds/blueprints/api/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/titanembeds/blueprints/api/api.py b/webapp/titanembeds/blueprints/api/api.py index aeea948..8a9f685 100644 --- a/webapp/titanembeds/blueprints/api/api.py +++ b/webapp/titanembeds/blueprints/api/api.py @@ -477,7 +477,7 @@ def webhook_discordbotsorg_vote(): abort(403) user_id = incoming.get("user") vote_type = incoming.get("type") - params = dict(parse_qsl(urlsplit(url).query)) + params = dict(parse_qsl(urlsplit(incoming.get("query", "")).query)) if vote_type == "upvote": redis_store.set("DiscordBotsOrgVoted/" + user_id, "voted", 86400) else: