Bugfix view None ratings caused error 500 in certain cases

This commit is contained in:
Ozzie Isaacs 2024-02-18 14:17:43 +01:00
parent 859dac462b
commit d659430116

View File

@ -613,10 +613,9 @@ def render_ratings_books(page, book_id, order):
db_filter,
[order[0][0]],
True, config.config_read_column,
db.books_series_link,
db.Books.id == db.books_series_link.c.book,
db.Series,
db.books_ratings_link, db.Ratings)
db.books_ratings_link,
db.Books.id == db.books_ratings_link.c.book,
db.Ratings)
title = _("Rating: None")
else:
name = calibre_db.session.query(db.Ratings).filter(db.Ratings.id == book_id).first()