From 6693bfcd0fa021b8f76e56db40cb7dd86fdab1cd Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 20 Feb 2015 15:13:23 +0000 Subject: [PATCH] return document or 404 no 500 --- pandora/document/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/document/views.py b/pandora/document/views.py index 134b401c6..fc74b748c 100644 --- a/pandora/document/views.py +++ b/pandora/document/views.py @@ -23,7 +23,7 @@ import models def get_document_or_404_json(id): try: return models.Document.get(id) - except models.Document.DoesNotExist: + except: response = {'status': {'code': 404, 'text': 'Document not found'}} raise HttpErrorJson(response)