fix bug where movies did not show up properly

This commit is contained in:
bartholin 2024-10-13 16:19:17 +02:00
parent 74929081ec
commit c411befcf5

View File

@ -78,7 +78,7 @@ def get_watched_movies():
def new_movie(movie): def new_movie(movie):
db = get_db() db = get_db()
movie["id"] = db.execute("INSERT INTO movies (title, year, poster, plot, number) VALUES (?,?,?,?,?) RETURNING id", movie["id"] = db.execute("INSERT INTO movies (title, year, poster, plot, number, watched) VALUES (?,?,?,?,?, 0) RETURNING id",
(movie["title"], movie["year"], movie["poster"], movie["plot"], new_nb())).fetchone()["id"] (movie["title"], movie["year"], movie["poster"], movie["plot"], new_nb())).fetchone()["id"]
db.commit() db.commit()
return movie return movie