From a6c32d2f0b2e99b74332a0a2b14293ee03b4470e Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 7 Sep 2010 09:58:05 +0200 Subject: [PATCH] fixes #814: 404 when no html --- apps/catalogue/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 556bae1fe..8630ebf61 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -257,6 +257,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'): -- 2.20.1