Browse Source

Change logic to support when current_app is not available

pull/1360/head
Keyan Pishdadian 10 years ago
parent
commit
19df249c89
  1. 9
      flask/wrappers.py

9
flask/wrappers.py

@ -174,10 +174,11 @@ class Request(RequestBase):
.. versionadded:: 0.8
"""
if current_app.config['DEBUG']:
raise BadRequest(e)
else:
raise BadRequest()
ctx = _request_ctx_stack.top
if ctx is not None:
if ctx.app.config.get('DEBUG', False):
raise BadRequest(e)
raise BadRequest()
def _load_form_data(self):
RequestBase._load_form_data(self)

Loading…
Cancel
Save