X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/4bec460435e74e85924894c7f4065d1468baba8b..968cb1f19a746aed062a8ee64f6d0f0dd5969e23:/apps/catalogue/views.py?ds=inline diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index d9ae442aa..088d0eee6 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -262,6 +262,8 @@ def book_stub_detail(request, slug): def book_text(request, slug): book = get_object_or_404(models.Book, slug=slug) + if not book.has_html_file(): + raise Http404 book_themes = {} for fragment in book.fragments.all(): for theme in fragment.tags.filter(category='theme'):