X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/24ae804e7a88a17dcefd0e671eb08e548de14ae8..17ed87c493556adae66975e6cee1454b74e0c904:/src/cover/views.py diff --git a/src/cover/views.py b/src/cover/views.py index 25663a09..a12dce73 100644 --- a/src/cover/views.py +++ b/src/cover/views.py @@ -32,6 +32,10 @@ def preview(request, book, chunk=None, rev=None): If rev is not given, use publishable version. """ chunk = Chunk.get(book, chunk) + + if chunk.book.cover and rev is None and not request.GET.get('width') and not request.GET.get('height'): + return HttpResponseRedirect(chunk.book.cover.url) + if rev is not None: try: revision = chunk.at_revision(rev)