Don't lose exception info (#4638)

This commit is contained in:
Tom Christie 2016-11-01 10:22:30 +00:00 committed by GitHub
parent 895c67c9a2
commit 7eb6cdca00

View File

@ -445,7 +445,7 @@ class APIView(View):
renderer_format = getattr(request.accepted_renderer, 'format')
use_plaintext_traceback = renderer_format not in ('html', 'api', 'admin')
request.force_plaintext_errors(use_plaintext_traceback)
raise exc
raise
# Note: Views are made CSRF exempt from within `as_view` as to prevent
# accidental removal of this exemption in cases where `dispatch` needs to