X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/2d538a50605add2666172861744229599487f1b2..2245baeed5c7fb97da2aeb5441aadf26c280fee9:/src/documents/views.py?ds=inline diff --git a/src/documents/views.py b/src/documents/views.py index f4c85612..0fbb3b9f 100644 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -362,14 +362,21 @@ def book(request, slug): publish_error = book.publishable_error() publishable = publish_error is None + stats = None try: doc = book.wldocument(librarian2=True) except: doc = None + else: + try: + stats = doc.get_statistic() + except: + pass return render(request, "documents/book_detail.html", { "book": book, "doc": doc, + "stats": stats, "publishable": publishable, "publishable_error": publish_error, "form": form,