From 683c9c7bddc14d2af414a46cbd2eacf6c4780712 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 8 Jul 2022 21:42:40 +0200 Subject: [PATCH] fix lingering notifications --- files/routes/notifications.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/files/routes/notifications.py b/files/routes/notifications.py index 22727e5bf..b2a2bda82 100644 --- a/files/routes/notifications.py +++ b/files/routes/notifications.py @@ -44,6 +44,8 @@ def notifications_modmail(v): next_exists = (len(comments) > 25) listing = comments[:25] + g.db.commit() + if request.headers.get("Authorization"): return {"data":[x.json for x in listing]} return render_template("notifications.html", @@ -71,6 +73,8 @@ def notifications_messages(v): next_exists = (len(comments) > 25) listing = comments[:25] + g.db.commit() + if request.headers.get("Authorization"): return {"data":[x.json for x in listing]} return render_template("notifications.html", @@ -148,6 +152,8 @@ def notifications_modactions(v): next_exists = (len(notifications) > len(listing)) + g.db.commit() + if request.headers.get("Authorization"): return {"data":[x.json for x in listing]} return render_template("notifications.html", @@ -185,6 +191,7 @@ def notifications_reddit(v): next_exists = (len(notifications) > len(listing)) + g.db.commit() if request.headers.get("Authorization"): return {"data":[x.json for x in listing]} @@ -255,6 +262,7 @@ def notifications(v): if c not in listing: listing.append(c) + g.db.commit() if request.headers.get("Authorization"): return {"data":[x.json for x in listing]}