fix a bug for blank entries

This commit is contained in:
bartholin 2024-10-13 16:28:34 +02:00
parent 5f0deef482
commit a8e5b976fe

View File

@ -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}