From 0bca87c7cc26e83f034b72aa932c3010d03e4989 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 13 Sep 2021 16:42:01 +0200 Subject: [PATCH] fd --- files/classes/user.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/files/classes/user.py b/files/classes/user.py index 9b6279f9f7..d3c7697b18 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -369,10 +369,13 @@ class User(Base, Stndrd, Age_times): return self.notifications.filter(Notification.read == False).join(Notification.comment).filter( Comment.author_id == AUTOJANNY_ACCOUNT).count() - @cache.memoize(timeout=86400) + def notification_messages(self, page=1): comments = g.db.query(Comment.id).filter(or_(Comment.author_id==self.id, Comment.sentto==self.id), Comment.parent_submission == None).order_by(Comment.created_utc.desc(), not_(Comment.child_comments.any())).offset(25*(page-1)).limit(26).all() + for c in comments: + print(c.child_comments) + return [c[0] for c in comments] @property