master
Aevann1 2021-09-24 18:36:52 +02:00
parent dc03802454
commit 0d60616a15
1 changed files with 2 additions and 10 deletions

View File

@ -68,17 +68,9 @@ def searchposts(v):
words=tuple(words)
posts=posts.filter(*words)
if 'over18' in criteria:
posts = posts.filter(Submission.over_18==True)
if 'over18' in criteria: posts = posts.filter(Submission.over_18==True)
if 'author' in criteria:
if v and v.admin_level == 6:
posts = posts.filter(Submission.author_id == get_user(criteria['author']).id)
else:
posts=posts.filter(
Submission.author_id==get_user(criteria['author']).id,
User.is_private==False,
)
if 'author' in criteria: posts = posts.filter(Submission.author_id == get_user(criteria['author']).id)
if 'domain' in criteria:
domain=criteria['domain']