From c9becb9301c032ea7c14ee6c01c641a573bdd742 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi
Date: Mon, 15 May 2023 21:34:23 +0300
Subject: [PATCH 1/1] Fixed exception when a notification is not found
IssueID #29
model.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/model.py b/model.py
index 87290d2..97a8421 100644
--- a/model.py
+++ b/model.py
@@ -1597,7 +1597,10 @@ class Database:
return notifs
def get_notification(self, user, id, clear=False) -> Notification:
return self.get_notifications(user, id=id, clear=clear)[0]
notif = self.get_notifications(user, id=id, clear=clear)
if notif:
return notif[0]
return None
TOKEN_CHARS = [chr(ord('a') + i) for i in range(26)] + \
[chr(ord('A') + i) for i in range(26)] + \
--
2.25.1
text/plain
This content has been proxied by September (ba2dc).