From 78b34ecdd2176dd5e408fe65d5b67b33c10b07d3 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Tue, 25 Mar 2014 19:01:07 +0100 Subject: [PATCH] return only publicely visible comments on /count A regression introduced by 5ce48de. --- isso/db/comments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isso/db/comments.py b/isso/db/comments.py index 7d3aa01..063eb0c 100644 --- a/isso/db/comments.py +++ b/isso/db/comments.py @@ -182,7 +182,7 @@ class Comments: threads = dict(self.db.execute([ 'SELECT threads.uri, COUNT(comments.id) FROM comments', - 'LEFT OUTER JOIN threads ON threads.id = tid', + 'LEFT OUTER JOIN threads ON threads.id = tid AND comments.mode = 1', 'GROUP BY threads.uri' ]).fetchall())