fd
This commit is contained in:
parent
9c6e639280
commit
577eb12d5f
4 changed files with 7 additions and 6 deletions
|
@ -131,7 +131,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
|||
cutoff = now - 31536000
|
||||
posts = posts.filter(Submission.created_utc >= cutoff)
|
||||
|
||||
posts = posts.filter_by(is_banned=False,stickied=False,private=False,deleted_utc = 0)
|
||||
posts = posts.filter_by(is_banned=False, stickied=None, private=False, deleted_utc = 0)
|
||||
|
||||
if v:
|
||||
posts = posts.filter(or_(Submission.processing == False, Submission.author_id == v.id))
|
||||
|
@ -198,7 +198,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
|||
|
||||
posts = posts[:25]
|
||||
|
||||
if page == 1: posts = g.db.query(Submission).options(lazyload('*')).filter_by(stickied=True).all() + posts
|
||||
if page == 1: posts = g.db.query(Submission).options(lazyload('*')).filter(Submission.stickied != None).all() + posts
|
||||
|
||||
if ids_only: posts = [x.id for x in posts]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue