From 7854a563bd23ce4560bf7ed4126aab13641bbbd3 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 4 Feb 2022 06:10:31 +0200 Subject: [PATCH] dsf --- files/routes/search.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/routes/search.py b/files/routes/search.py index d0be90710..0efbd0054 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -64,6 +64,7 @@ def searchposts(v): if 'author' in criteria: + posts = posts.filter(Submission.ghost == None) author = get_user(criteria['author']) if not author: return {"error": f"User not found"} if author.is_private and author.id != v.id and v.admin_level < 2 and not v.eye: @@ -210,6 +211,7 @@ def searchcomments(v): comments = g.db.query(Comment.id).filter(Comment.parent_submission != None) if 'author' in criteria: + comments = comments.filter(Comment.ghost == None) author = get_user(criteria['author']) if not author: return {"error": f"User not found"} if author.is_private and author.id != v.id and v.admin_level < 2 and not v.eye: