diff --git a/files/routes/front.py b/files/routes/front.py index 34abb8384..e2fb38900 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -48,12 +48,11 @@ def notifications(v): if modmail and v.admin_level > 1: comments = g.db.query(Comment).filter(Comment.sentto==2).order_by(Comment.id.desc()).offset(25*(page-1)).limit(26).all() next_exists = (len(comments) > 25) - comments = comments[:25] + listing = comments[:25] elif messages: comments = g.db.query(Comment).filter(Comment.sentto != None, or_(Comment.author_id==v.id, Comment.sentto==v.id), Comment.parent_submission == None, Comment.level == 1).order_by(Comment.id.desc()).offset(25*(page-1)).limit(26).all() next_exists = (len(comments) > 25) - comments = comments[:25] - comments = [x.parent_comm] + listing = comments[:25] elif posts: notifications = g.db.query(Notification, Comment).join(Comment, Notification.comment_id == Comment.id).filter(Notification.user_id == v.id, Comment.author_id == AUTOJANNY_ID).order_by(Notification.created_utc.desc()).offset(25 * (page - 1)).limit(101).all() @@ -104,11 +103,11 @@ def notifications(v): g.db.commit() - all = set(x[0] for x in g.db.query(Notification.comment_id).join(Comment, Notification.comment_id == Comment.id).filter(Comment.is_banned == False, + all = set([x[0] for x in g.db.query(Notification.comment_id).join(Comment, Notification.comment_id == Comment.id).filter(Comment.is_banned == False, Comment.deleted_utc == 0, Comment.author_id != AUTOJANNY_ID, Comment.body_html.notlike('

New rdrama mention: