diff --git a/drama/helpers/get.py b/drama/helpers/get.py index 880055714..afbb185aa 100644 --- a/drama/helpers/get.py +++ b/drama/helpers/get.py @@ -166,7 +166,6 @@ def get_posts(pids, sort="hot", v=None): blocked, blocked.c.user_id == Submission.author_id, isouter=True) - # ).order_by(Submission.id.desc()).all() output = [p[0] for p in query] for i in range(len(output)): diff --git a/drama/routes/front.py b/drama/routes/front.py index 133fc5def..ed57a538b 100644 --- a/drama/routes/front.py +++ b/drama/routes/front.py @@ -72,7 +72,7 @@ def notifications(v): @cache.memoize(timeout=1500) def frontlist(v=None, sort="hot", page=1,t="all", ids_only=True, filter_words='', **kwargs): - posts = g.db.query(Submission).options(lazyload('*')).filter_by(is_banned=False,stickied=False,private=False).filter(Submission.deleted_utc == 0) + posts = g.db.query(Submission).options(lazyload('*')).filter_by(is_banned=False,stickied=False,private=False).filter(Submission.deleted_utc == 0).order_by(Submission.id.desc()) if v and v.admin_level == 0: blocking = g.db.query(