From 4a9e02f8615c85fbc42f4aac9dedef36b94e5fc5 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 3 Sep 2013 16:13:03 -0400 Subject: [PATCH] SQL is dumb. --- tasks/afc_statistics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/afc_statistics.py b/tasks/afc_statistics.py index 14f9820..7d078c3 100644 --- a/tasks/afc_statistics.py +++ b/tasks/afc_statistics.py @@ -233,7 +233,8 @@ class AFCStatistics(Task): r.page_latest, r.page_title, r.page_namespace FROM page AS s LEFT JOIN {0}_p.page AS r ON s.page_id = r.page_id - WHERE s.page_modify_oldid != r.page_latest""" + WHERE s.page_modify_oldid != r.page_latest + OR r.page_id IS NULL""" cursor.execute(query.format(self.site.name)) for pageid, title, oldid, real_oldid, real_title, real_ns in cursor: