Only delete movie if it exists. fixes #107
This commit is contained in:
@@ -365,8 +365,9 @@ class MoviePlugin(Plugin):
|
||||
db = get_session()
|
||||
|
||||
movie = db.query(Movie).filter_by(id = movie_id).first()
|
||||
db.delete(movie)
|
||||
db.commit()
|
||||
if movie:
|
||||
db.delete(movie)
|
||||
db.commit()
|
||||
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user