소스 검색

afc_statistics: Fix query for getting accepting reviewer info.

main
Ben Kurtovic 5 년 전
부모
커밋
36b5a5f790
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. +6
    -3
      tasks/afc_statistics.py

+ 6
- 3
tasks/afc_statistics.py 파일 보기

@@ -612,9 +612,12 @@ class AFCStatistics(Task):

def get_accepted(self, pageid, content=None):
"""Return (acceptor, accept_ts, accept_revid) for the given page."""
query = """SELECT rev_user_text, rev_timestamp, rev_id FROM revision
WHERE rev_comment LIKE "% moved page [[%]] to [[%]]%"
AND rev_page = ? ORDER BY rev_timestamp DESC LIMIT 1"""
query = """SELECT rev_user_text, rev_timestamp, rev_id
FROM revision
LEFT JOIN comment ON rev_comment_id = comment_id
WHERE rev_page = ?
AND comment_text LIKE "% moved page [[%]] to [[%]]%"
ORDER BY rev_timestamp DESC LIMIT 1"""
result = self.site.sql_query(query, (pageid,))
try:
a_user, a_time, a_id = list(result)[0]


불러오는 중...
취소
저장