From 22a9e609d7f00bac9d88306d3c9f4cf3bd244dee 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 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'): -- 2.20.1