Compare commits
2 Commits
c7e3a45761
...
71c05404af
Author | SHA1 | Date | |
---|---|---|---|
|
71c05404af | ||
|
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