Skip to content
Myr

Change logic to support when current_app is not available

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Keyan Pishdadian · committed by Keyan Pishdadian · parent 82b7983 · Browse files · 1 file+5 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−4 removed

  • other:+5 added−4 removed

1 file+5 added−4 removed

modified:flask/wrappers.py+5 added-4 removed
172 unmodified lines
173 add it by subclassing.174175 .. versionadded:: 0.8176 """177 if current_app.config['DEBUG']:178 raise BadRequest(e)179 else:180 raise BadRequest()177 ctx = _request_ctx_stack.top178 if ctx is not None:179 if ctx.app.config.get('DEBUG', False):180 raise BadRequest(e)181 raise BadRequest()182183 def _load_form_data(self):184 RequestBase._load_form_data(self)185
19 unmodified lines