forked from rDrama/rDrama
fix 500 error
parent
d2b8379ecc
commit
77db259aca
|
@ -144,12 +144,12 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
||||||
if v: size = v.frontsize or 0
|
if v: size = v.frontsize or 0
|
||||||
else: size = PAGE_SIZE
|
else: size = PAGE_SIZE
|
||||||
|
|
||||||
|
if SITE_NAME == 'WPD' and sort == "hot" and page == 1:
|
||||||
|
posts = posts.filter(Post.hole != 'pets')
|
||||||
|
|
||||||
posts = posts.options(load_only(Post.id)).offset(size * (page - 1))
|
posts = posts.options(load_only(Post.id)).offset(size * (page - 1))
|
||||||
|
|
||||||
if SITE_NAME == 'WPD' and sort == "hot" and hole == None:
|
if SITE_NAME == 'WPD' and sort == "hot" and hole == None:
|
||||||
if page == 1:
|
|
||||||
posts = posts.filter(Post.hole != 'pets')
|
|
||||||
|
|
||||||
posts = posts.limit(200).all()
|
posts = posts.limit(200).all()
|
||||||
posts_in_limited_holes = [x for x in posts if x.hole in LIMITED_WPD_HOLES]
|
posts_in_limited_holes = [x for x in posts if x.hole in LIMITED_WPD_HOLES]
|
||||||
captured_holes = set()
|
captured_holes = set()
|
||||||
|
|
Loading…
Reference in New Issue