mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-10 15:07:35 +01:00
Fix crash by truncating notification titles
This commit is contained in:
parent
96b22744ec
commit
655ed2255a
@ -213,6 +213,9 @@ class Notification(db.Model):
|
|||||||
url = db.Column(db.String(200), nullable=True)
|
url = db.Column(db.String(200), nullable=True)
|
||||||
|
|
||||||
def __init__(self, us, cau, titl, ur):
|
def __init__(self, us, cau, titl, ur):
|
||||||
|
if len(titl) > 100:
|
||||||
|
title = title[:99] + "…"
|
||||||
|
|
||||||
self.user = us
|
self.user = us
|
||||||
self.causer = cau
|
self.causer = cau
|
||||||
self.title = titl
|
self.title = titl
|
||||||
|
Loading…
Reference in New Issue
Block a user