From 4e5f7935ddd13b5d50bb93241d77907efb522cf3 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 28 May 2022 02:30:07 +0200 Subject: [PATCH] dfs --- files/routes/comments.py | 2 +- files/routes/posts.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 0836e4f5c..ae813b472 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -636,7 +636,7 @@ def api_comment(v): cache.delete_memoized(comment_idlist) - v.comment_count = g.db.query(Comment).filter(Comment.author_id == v.id, Comment.parent_submission != None).filter_by(is_banned=False, deleted_utc=0).count() + v.comment_count = g.db.query(Comment).filter(Comment.author_id == v.id, Comment.parent_submission != None).count() g.db.add(v) c.voted = 1 diff --git a/files/routes/posts.py b/files/routes/posts.py index 1813083fb..09062fa49 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1353,7 +1353,7 @@ def submit_post(v, sub=None): post.comment_count += 1 post.replies = [c] - v.post_count = g.db.query(Submission).filter_by(author_id=v.id, is_banned=False, deleted_utc=0).count() + v.post_count = g.db.query(Submission).filter_by(author_id=v.id).count() g.db.add(v) if v.id == PIZZASHILL_ID: