forked from MarseyWorld/MarseyWorld
dfdf
parent
db2e4c5910
commit
9a460515ac
|
@ -24,7 +24,7 @@ def notifications(v):
|
|||
messages = request.args.get('messages', False)
|
||||
posts = request.args.get('posts', False)
|
||||
if messages:
|
||||
if v.admin_level == 6: comments = g.db.query(Comment).filter(len(Comment.child_comments) == 0, or_(Comment.author_id==v.id, Comment.sentto==v.id, Comment.sentto==0)).filter(Comment.parent_submission == None).order_by(Comment.created_utc.desc()).offset(25 * (page - 1)).limit(26).all()
|
||||
if v.admin_level == 6: comments = g.db.query(Comment).filter(Comment.child_comments is None, or_(Comment.author_id==v.id, Comment.sentto==v.id, Comment.sentto==0)).filter(Comment.parent_submission == None).order_by(Comment.created_utc.desc()).offset(25 * (page - 1)).limit(26).all()
|
||||
else: comments = g.db.query(Comment).filter(or_(Comment.author_id==v.id, Comment.sentto==v.id)).filter(Comment.parent_submission == None).order_by(Comment.created_utc.desc()).offset(25 * (page - 1)).limit(26).all()
|
||||
next_exists = (len(comments) == 26)
|
||||
comments = comments[:25]
|
||||
|
|
Loading…
Reference in New Issue