mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-30 21:40:00 +00:00
Fix crash when 'view book after edit' is not checked
This commit is contained in:
parent
cd0aeb2857
commit
1a922d4552
@ -723,7 +723,7 @@ def edit_book(book_id):
|
|||||||
new_rating = db.Ratings(rating=int(to_save["rating"].strip()))
|
new_rating = db.Ratings(rating=int(to_save["rating"].strip()))
|
||||||
book.ratings[0] = new_rating
|
book.ratings[0] = new_rating
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
if to_save["detail_view"]:
|
if "detail_view" in to_save:
|
||||||
return redirect(url_for('show_book', id=book.id))
|
return redirect(url_for('show_book', id=book.id))
|
||||||
else:
|
else:
|
||||||
return render_template('edit_book.html', book=book)
|
return render_template('edit_book.html', book=book)
|
||||||
|
Loading…
Reference in New Issue
Block a user