fg
This commit is contained in:
parent
ef4c00d99c
commit
72020a1762
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue