From 0108a9a79d3af9b9b1a11cb377a4e260375a991b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= Date: Sat, 24 Jun 2023 07:36:49 +0300 Subject: [PATCH 1/1] Bumped version number to 5.2; fixed exception Viewing a post page when signed out would try to access a `None` object. --- 50_bubble.py | 2 +- feeds.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/50_bubble.py b/50_bubble.py index 64bc77b..ab50de9 100644 --- a/50_bubble.py +++ b/50_bubble.py @@ -17,7 +17,7 @@ from utils import * from worker import * -__version__ = '5.1' +__version__ = '5.2' class Bubble: diff --git a/feeds.py b/feeds.py index 624babc..d0ad2d9 100644 --- a/feeds.py +++ b/feeds.py @@ -406,7 +406,7 @@ def make_post_page(session, post): page += '\n' + session.dashboard_link() # Notification on this page. - if post: + if post and user: notifs = db.get_notifications(user=user, post_id=post.id, sort_desc=True) if notifs: page += f'{len(notifs)} notification{plural_s(len(notifs))} about this post:\n' -- 2.34.1