From 4e071254f171b2e20fbf495673615e3b70133eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= Date: Sat, 12 Oct 2024 06:39:18 +0300 Subject: [PATCH 1/1] Posts are expected to have a non-NULL title; bumped version to 9.1 Even though the schema says otherwise... --- 50_bubble.py | 2 +- model.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/50_bubble.py b/50_bubble.py index 5238cde..823df76 100644 --- a/50_bubble.py +++ b/50_bubble.py @@ -18,7 +18,7 @@ from utils import * from worker import * -__version__ = '9.0' +__version__ = '9.1' class Bubble: diff --git a/model.py b/model.py index e710cdb..52dc07a 100644 --- a/model.py +++ b/model.py @@ -514,7 +514,7 @@ class Post: self.parent = parent self.user = user self.issueid = issueid - self.title = title + self.title = title if title is not None else '' self.flags = flags self.is_draft = is_draft self.is_pinned = is_pinned @@ -1467,6 +1467,7 @@ class Database: def create_post(self, user: User, subspace_id: int, parent=0, title=''): assert type(user) is User + if title is None: title = '' # Unmoderated subspaces become locked. subspace = self.get_subspace(id=subspace_id) -- 2.34.1