remotes/1693045480750635534/spooky-22
Aevann1 2021-08-31 18:31:48 +02:00
parent 223bd01371
commit f7bb240a64
1 changed files with 2 additions and 2 deletions

View File

@ -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 == []]