send 404 not 500 if document does not exist

This commit is contained in:
j 2014-11-20 13:24:43 +00:00
parent b7ab390425
commit e98b97842e

View file

@ -274,7 +274,7 @@ def file(request, id, name=None):
def thumbnail(request, id, size=256, page=None):
size = int(size)
document = models.Document.get(id)
document = get_document_or_404_json(id)
return HttpFileResponse(document.thumbnail(size, page=page))
@login_required_json