From efdc8a0a6fe548775b430ce7d3a6688e64d36080 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 31 Aug 2021 17:56:13 +0200 Subject: [PATCH] fdfd --- files/classes/user.py | 2 -- files/routes/front.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index 4ffd8d4a4..1eaf667fe 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -350,7 +350,6 @@ class User(Base, Stndrd, Age_times): return self.notifications.filter(Notification.read == False).join(Notification.comment).filter( Comment.author_id == AUTOJANNY_ACCOUNT).count() - @lazy def notification_subscriptions(self, page=1, all_=False): notifications = self.notifications.join(Notification.comment).filter(Comment.author_id == AUTOJANNY_ACCOUNT) @@ -369,7 +368,6 @@ class User(Base, Stndrd, Age_times): return output - @lazy def notification_commentlisting(self, page=1, all_=False): notifications = self.notifications.join(Notification.comment).filter( diff --git a/files/routes/front.py b/files/routes/front.py index 4771c81c9..6f0ff9d50 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -24,7 +24,7 @@ def notifications(v): messages = request.args.get('messages', False) posts = request.args.get('posts', False) if messages: - if v.admin_level == 6: comments = g.db.query(Comment).filter(Comment.child_comments is [], or_(Comment.author_id==v.id, Comment.sentto==v.id, Comment.sentto==0)).filter(Comment.parent_submission == None).order_by(Comment.created_utc.desc()).offset(25 * (page - 1)).limit(26).all() + if v.admin_level == 6: comments = g.db.query(Comment).filter(Comment.child_comments == [], or_(Comment.author_id==v.id, Comment.sentto==v.id, Comment.sentto==0)).filter(Comment.parent_submission == None).order_by(Comment.created_utc.desc()).offset(25 * (page - 1)).limit(26).all() else: comments = g.db.query(Comment).filter(or_(Comment.author_id==v.id, Comment.sentto==v.id)).filter(Comment.parent_submission == None).order_by(Comment.created_utc.desc()).offset(25 * (page - 1)).limit(26).all() next_exists = (len(comments) == 26) comments = comments[:25]