remotes/1693045480750635534/spooky-22
fireworks88 2021-09-09 22:34:03 +02:00
parent aa300641af
commit 1d7f67b444
1 changed files with 7 additions and 4 deletions

View File

@ -52,10 +52,13 @@ def searchlisting(criteria, v=None, page=1, t="None", sort="top", b=None):
posts = posts.filter(Submission.over_18==True)
if 'author' in criteria:
posts=posts.filter(
Submission.author_id==get_user(criteria['author']).id,
User.is_private==False,
)
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 'domain' in criteria:
domain=criteria['domain']