From 883887587977d719eee4acb8e849651f999aa148 Mon Sep 17 00:00:00 2001 From: Vivianne Langdon Date: Wed, 2 Mar 2022 04:07:13 -0800 Subject: [PATCH] Fix failure to 404 --- bookwyrm/views/books/books.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bookwyrm/views/books/books.py b/bookwyrm/views/books/books.py index 48b148e34..d01062467 100644 --- a/bookwyrm/views/books/books.py +++ b/bookwyrm/views/books/books.py @@ -47,12 +47,12 @@ class Book(View): .first() ) - if r := maybe_redirect_local_path(request, book): - return r - if not book or not book.parent_work: raise Http404() + if r := maybe_redirect_local_path(request, book): + return r + # all reviews for all editions of the book reviews = models.Review.privacy_filter(request.user).filter( book__parent_work__editions=book