Explicitly raise exc in 'raise_uncaught_exception'

This commit is contained in:
Ryan P Kilby 2019-02-01 19:58:24 -08:00
parent 7310411533
commit eca7632e05

View File

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