We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44da905 commit 7b08035Copy full SHA for 7b08035
flask/wrappers.py
@@ -13,7 +13,7 @@
13
from werkzeug.exceptions import BadRequest
14
15
from . import json
16
-from .globals import _request_ctx_stack, current_app
+from .globals import _request_ctx_stack
17
18
_missing = object()
19
@@ -175,9 +175,8 @@ def on_json_loading_failed(self, e):
175
.. versionadded:: 0.8
176
"""
177
ctx = _request_ctx_stack.top
178
- if ctx is not None:
179
- if ctx.app.config.get('DEBUG', False):
180
- raise BadRequest('Failed to decode JSON object: {0}'.format(e))
+ if ctx is not None and ctx.app.config.get('DEBUG', False):
+ raise BadRequest('Failed to decode JSON object: {0}'.format(e))
181
raise BadRequest()
182
183
def _load_form_data(self):
0 commit comments