forked from rDrama/rDrama
fix /reported/posts having much less than PAGE_SIZE
parent
132bc76dc2
commit
5e1df64b69
|
@ -335,7 +335,7 @@ def image_posts_listing(v):
|
||||||
def reported_posts(v):
|
def reported_posts(v):
|
||||||
page = get_page()
|
page = get_page()
|
||||||
|
|
||||||
listing = g.db.query(Post).options(load_only(Post.id)).filter_by(
|
listing = g.db.query(Post).distinct(Post.id).options(load_only(Post.id)).filter_by(
|
||||||
is_approved=None,
|
is_approved=None,
|
||||||
is_banned=False,
|
is_banned=False,
|
||||||
deleted_utc=0
|
deleted_utc=0
|
||||||
|
@ -358,7 +358,7 @@ def reported_posts(v):
|
||||||
def reported_comments(v):
|
def reported_comments(v):
|
||||||
page = get_page()
|
page = get_page()
|
||||||
|
|
||||||
listing = g.db.query(Comment).options(load_only(Comment.id)).filter_by(
|
listing = g.db.query(Comment).distinct(Comment.id).options(load_only(Comment.id)).filter_by(
|
||||||
is_approved=None,
|
is_approved=None,
|
||||||
is_banned=False,
|
is_banned=False,
|
||||||
deleted_utc=0
|
deleted_utc=0
|
||||||
|
|
Loading…
Reference in New Issue