From 83f8a704075daf8b63a98a41acb3d244f647f995 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Wed, 9 Oct 2024 13:24:50 +1300 Subject: [PATCH] exclude deleted posts from search results --- app/search/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/search/routes.py b/app/search/routes.py index 6d57e2a1..e684314e 100644 --- a/app/search/routes.py +++ b/app/search/routes.py @@ -33,7 +33,7 @@ def run_search(): sort_by = request.args.get('sort_by', '') if q is not None or type != 0 or language_id != 0 or community_id != 0: - posts = Post.query + posts = Post.query.filter(Post.deleted == False) if current_user.is_authenticated: if current_user.ignore_bots == 1: posts = posts.filter(Post.from_bot == False)