From a8e5b976fed5df7b28fed48c3b64af7917154bad Mon Sep 17 00:00:00 2001 From: bartholin Date: Sun, 13 Oct 2024 16:28:34 +0200 Subject: [PATCH] fix a bug for blank entries --- kinolist/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kinolist/database.py b/kinolist/database.py index d11ae35..b571ba8 100644 --- a/kinolist/database.py +++ b/kinolist/database.py @@ -87,7 +87,7 @@ def new_blank_movie(): db = get_db() id = db.execute("INSERT INTO movies DEFAULT VALUES RETURNING id").fetchone()["id"] nb = new_nb() - db.execute("UPDATE movies SET number = ? WHERE id = ?", (nb, id)) + db.execute("UPDATE movies SET number = ?, watched = 0 WHERE id = ?", (nb, id)) db.commit() return {"id": id, "nb": nb}