浏览代码

Fix query in get_status().

tags/v0.1^2
Ben Kurtovic 13 年前
父节点
当前提交
5fc281336a
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      bot/tasks/afc_history.py

+ 3
- 2
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


正在加载...
取消
保存