Remove unused import and clean control flow
This commit is contained in:
parent
44da905cb7
commit
7b080355f5
1 changed files with 3 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase
|
|||
from werkzeug.exceptions import BadRequest
|
||||
|
||||
from . import json
|
||||
from .globals import _request_ctx_stack, current_app
|
||||
from .globals import _request_ctx_stack
|
||||
|
||||
_missing = object()
|
||||
|
||||
|
|
@ -175,9 +175,8 @@ class Request(RequestBase):
|
|||
.. versionadded:: 0.8
|
||||
"""
|
||||
ctx = _request_ctx_stack.top
|
||||
if ctx is not None:
|
||||
if ctx.app.config.get('DEBUG', False):
|
||||
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))
|
||||
raise BadRequest()
|
||||
|
||||
def _load_form_data(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue