forked from orbit-oss/flask
Use the _request_ctx_stack instead of the proxy for consistency with the others.
This commit is contained in:
parent
87f50fdc6f
commit
23bf2633f6
1 changed files with 2 additions and 2 deletions
|
|
@ -1397,7 +1397,7 @@ class Flask(_PackageBoundObject):
|
||||||
This also triggers the :meth:`url_value_processor` functions before
|
This also triggers the :meth:`url_value_processor` functions before
|
||||||
the actualy :meth:`before_request` functions are called.
|
the actualy :meth:`before_request` functions are called.
|
||||||
"""
|
"""
|
||||||
bp = request.blueprint
|
bp = _request_ctx_stack.top.request.blueprint
|
||||||
|
|
||||||
funcs = self.url_value_preprocessors.get(None, ())
|
funcs = self.url_value_preprocessors.get(None, ())
|
||||||
if bp is not None and bp in self.url_value_preprocessors:
|
if bp is not None and bp in self.url_value_preprocessors:
|
||||||
|
|
@ -1447,7 +1447,7 @@ class Flask(_PackageBoundObject):
|
||||||
tighter control over certain resources under testing environments.
|
tighter control over certain resources under testing environments.
|
||||||
"""
|
"""
|
||||||
funcs = reversed(self.teardown_request_funcs.get(None, ()))
|
funcs = reversed(self.teardown_request_funcs.get(None, ()))
|
||||||
bp = request.blueprint
|
bp = _request_ctx_stack.top.request.blueprint
|
||||||
if bp is not None and bp in self.teardown_request_funcs:
|
if bp is not None and bp in self.teardown_request_funcs:
|
||||||
funcs = chain(funcs, reversed(self.teardown_request_funcs[bp]))
|
funcs = chain(funcs, reversed(self.teardown_request_funcs[bp]))
|
||||||
exc = sys.exc_info()[1]
|
exc = sys.exc_info()[1]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue