remotes/1693045480750635534/spooky-22
Aevann1 2021-09-25 03:43:21 +02:00
parent de6f5ae49d
commit 930efafbec
1 changed files with 3 additions and 3 deletions

View File

@ -153,7 +153,7 @@ def front_all(v):
#@cache.memoize(timeout=86400)
def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='', **kwargs):
posts = g.db.query(Submission).options(lazyload('*'))
posts = g.db.query(Submission.id).options(lazyload('*'))
if 'rdrama' in request.host and sort == "hot":
cutoff = int(time.time()) - 86400
@ -223,9 +223,9 @@ 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(Submission.stickied != None).all() + posts
if page == 1: posts = g.db.query(Submission.id).options(lazyload('*')).filter(Submission.stickied != None).all() + posts
if ids_only: posts = [x.id for x in posts]
if ids_only: posts = [x[0] for x in posts]
print(posts)
return posts, next_exists