From 5fc281336a9382336a678d0a3b670c4c7af99a45 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sat, 19 Nov 2011 16:58:31 -0500 Subject: [PATCH] Fix query in get_status(). --- bot/tasks/afc_history.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot/tasks/afc_history.py b/bot/tasks/afc_history.py index a5585db..8224146 100644 --- a/bot/tasks/afc_history.py +++ b/bot/tasks/afc_history.py @@ -133,8 +133,9 @@ class Task(BaseTask): return STATUS_ACCEPT cats = self.categories - query = "SELECT 1 FROM categorylinks WHERE cl_from = ? AND cl_to = ?" - match = lambda cat: list(self.site.sql_query(query, (cat, pageid))) + sq = self.site.sql_query + query = "SELECT 1 FROM categorylinks WHERE cl_to = ? AND cl_from = ?" + match = lambda cat: list(sq(query, (cat.replace(" ", "_"), pageid))) if match(cats["pending"]): return STATUS_PEND