send 404 not 500 if document does not exist
This commit is contained in:
parent
b7ab390425
commit
e98b97842e
1 changed files with 1 additions and 1 deletions
|
@ -274,7 +274,7 @@ def file(request, id, name=None):
|
||||||
|
|
||||||
def thumbnail(request, id, size=256, page=None):
|
def thumbnail(request, id, size=256, page=None):
|
||||||
size = int(size)
|
size = int(size)
|
||||||
document = models.Document.get(id)
|
document = get_document_or_404_json(id)
|
||||||
return HttpFileResponse(document.thumbnail(size, page=page))
|
return HttpFileResponse(document.thumbnail(size, page=page))
|
||||||
|
|
||||||
@login_required_json
|
@login_required_json
|
||||||
|
|
Loading…
Reference in a new issue