forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-09-13 16:24:06 +02:00
parent df66febb5c
commit bfd0d04d9f
1 changed files with 3 additions and 3 deletions

View File

@ -371,12 +371,12 @@ class User(Base, Stndrd, Age_times):
@cache.memoize(timeout=86400)
def notification_messages(self, page=1):
comments = g.db.query(Comment).filter(or_(Comment.author_id==self.id, Comment.sentto==self.id), Comment.parent_submission == None).order_by(Comment.created_utc.desc()).limit(100).all()
comments = g.db.query(Comment).filter(or_(Comment.author_id==self.id, Comment.sentto==self.id), Comment.parent_submission == None).order_by(Comment.created_utc.desc()).all()
comments = [c.id for c in comments if c.child_comments == []]
firstrange = 25 * (page - 1)
secondrange = firstrange + 26
firstrange = 100 * (page - 1)
secondrange = firstrange + 101
return comments[firstrange:secondrange]
@property