From e7b64554c149fdbae1153ead84daa5cfc86e48c3 Mon Sep 17 00:00:00 2001 From: Hendrik L Date: Sat, 28 Dec 2024 11:11:59 +0100 Subject: [PATCH] don't count as trash if it's only one downvote or score is >=10 --- app/admin/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/routes.py b/app/admin/routes.py index 90a21304..f458464e 100644 --- a/app/admin/routes.py +++ b/app/admin/routes.py @@ -1206,11 +1206,11 @@ def admin_content(): post_replies = PostReply.query.join(User, User.id == PostReply.user_id).filter(PostReply.deleted == False) if show == 'trash': title = _('Bad / Most downvoted') - posts = posts.filter(Post.down_votes > 0) + posts = posts.filter(Post.down_votes > 1, Post.score < 10) if days > 0: posts = posts.filter(Post.posted_at > utcnow() - timedelta(days=days)) posts = posts.order_by(Post.score) - post_replies = post_replies.filter(PostReply.down_votes > 0) + post_replies = post_replies.filter(PostReply.down_votes > 1, PostReply.score < 10) if days > 0: post_replies = post_replies.filter(PostReply.posted_at > utcnow() - timedelta(days=days)) post_replies = post_replies.order_by(PostReply.score)