Fix for 'NoneType' object has no attribute 'author_sort' while trying to read a book (#2733)
This commit is contained in:
+2
-1
@@ -1516,7 +1516,6 @@ def profile():
|
||||
@viewer_required
|
||||
def read_book(book_id, book_format):
|
||||
book = calibre_db.get_filtered_book(book_id)
|
||||
book.ordered_authors = calibre_db.order_authors([book], False)
|
||||
|
||||
if not book:
|
||||
flash(_("Oops! Selected book is unavailable. File does not exist or is not accessible"),
|
||||
@@ -1524,6 +1523,8 @@ def read_book(book_id, book_format):
|
||||
log.debug("Selected book is unavailable. File does not exist or is not accessible")
|
||||
return redirect(url_for("web.index"))
|
||||
|
||||
book.ordered_authors = calibre_db.order_authors([book], False)
|
||||
|
||||
# check if book has a bookmark
|
||||
bookmark = None
|
||||
if current_user.is_authenticated:
|
||||
|
||||
Reference in New Issue
Block a user