fdfd
This commit is contained in:
parent
0ff0e08f08
commit
b5363997f8
1 changed files with 2 additions and 2 deletions
|
@ -353,8 +353,8 @@ class User(Base, Stndrd, Age_times):
|
|||
@cache.memoize()
|
||||
def notification_messages(self, page=1):
|
||||
|
||||
if self.admin_level == 6: comments = g.db.query(Comment).filter(or_(Comment.author_id==self.id, Comment.sentto==self.id, Comment.sentto==0)).filter(Comment.parent_submission == None).order_by(Comment.created_utc.desc()).limit(200).all()
|
||||
else: comments = g.db.query(Comment).filter(or_(Comment.author_id==self.id, Comment.sentto==self.id)).filter(Comment.parent_submission == None).order_by(Comment.created_utc.desc()).limit(200).all()
|
||||
if self.admin_level == 6: comments = g.db.query(Comment).filter(or_(Comment.author_id==self.id, Comment.sentto==self.id, Comment.sentto==0)).filter(Comment.parent_submission == None).order_by(Comment.created_utc.desc()).limit(100).all()
|
||||
else: comments = g.db.query(Comment).filter(or_(Comment.author_id==self.id, Comment.sentto==self.id)).filter(Comment.parent_submission == None).order_by(Comment.created_utc.desc()).limit(100).all()
|
||||
|
||||
comments = [c.id for c in comments if c.child_comments == []]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue