From 655ed2255a10d8e05fcf48f9dfb803013968a397 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 31 Aug 2019 18:38:15 +0100 Subject: [PATCH] Fix crash by truncating notification titles --- app/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models.py b/app/models.py index 4b835bbe..a2601541 100644 --- a/app/models.py +++ b/app/models.py @@ -213,6 +213,9 @@ class Notification(db.Model): url = db.Column(db.String(200), nullable=True) def __init__(self, us, cau, titl, ur): + if len(titl) > 100: + title = title[:99] + "…" + self.user = us self.causer = cau self.title = titl