fix bug where movies did not show up properly
This commit is contained in:
parent
74929081ec
commit
c411befcf5
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user