forked from mirrors/bookwyrm
Fix failure to 404
This commit is contained in:
parent
81594892ef
commit
8838875879
1 changed files with 3 additions and 3 deletions
|
@ -47,12 +47,12 @@ class Book(View):
|
||||||
.first()
|
.first()
|
||||||
)
|
)
|
||||||
|
|
||||||
if r := maybe_redirect_local_path(request, book):
|
|
||||||
return r
|
|
||||||
|
|
||||||
if not book or not book.parent_work:
|
if not book or not book.parent_work:
|
||||||
raise Http404()
|
raise Http404()
|
||||||
|
|
||||||
|
if r := maybe_redirect_local_path(request, book):
|
||||||
|
return r
|
||||||
|
|
||||||
# all reviews for all editions of the book
|
# all reviews for all editions of the book
|
||||||
reviews = models.Review.privacy_filter(request.user).filter(
|
reviews = models.Review.privacy_filter(request.user).filter(
|
||||||
book__parent_work__editions=book
|
book__parent_work__editions=book
|
||||||
|
|
Loading…
Reference in a new issue