cum
This commit is contained in:
parent
f4e80dcf0d
commit
c97c9173c1
1 changed files with 4 additions and 4 deletions
|
@ -157,10 +157,10 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
|||
if lt:
|
||||
posts = posts.filter(Submission.created_utc < lt)
|
||||
|
||||
if v:
|
||||
posts = posts.join(Submission.author).filter(or_(User.shadowbanned==False, Submission.author_id==v.id))
|
||||
else:
|
||||
posts = posts.join(Submission.author).filter(User.shadowbanned == False)
|
||||
#if v:
|
||||
# posts = posts.join(Submission.author).filter(or_(User.shadowbanned==False, Submission.author_id==v.id))
|
||||
#else:
|
||||
# posts = posts.join(Submission.author).filter(User.shadowbanned == False)
|
||||
|
||||
if sort == "hot":
|
||||
posts = sorted(posts.all(), key=lambda x: x.hotscore, reverse=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue