Browse Source

Change logic to support when current_app is not available

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

5
flask/wrappers.py

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

Loading…
Cancel
Save