From bf09176bfebf92cc4fa548fe7f3c488bc3bea9cc Mon Sep 17 00:00:00 2001 From: miteruzo Date: Tue, 8 Oct 2024 12:48:36 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=84=E3=82=8D=E3=81=84=E3=82=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update_db.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/update_db.py b/update_db.py index 036f12f..66d190c 100644 --- a/update_db.py +++ b/update_db.py @@ -34,7 +34,7 @@ class VideoResult (TypedDict): contentId: str title: str tags: str - description: str + description: str | None viewCounter: int startTime: str @@ -96,6 +96,8 @@ def update_tables ( title = datum['title'], description = datum['description'], uploaded_at = datetime.fromisoformat (datum['startTime'])) + if video.description is None: + video.description = '' video_dao.upsert (video, False) if video.id_ is not None: video_ids.append (video.id_)