Only delete movie if it exists. fixes #107

This commit is contained in:
Ruud
2012-04-19 21:29:59 +02:00
parent 86dda9c30e
commit 05fa253fc7
+3 -2
View File
@@ -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