forked from orbit-oss/flask
fix has_app_context and has_request_context
This commit is contained in:
parent
02a0851252
commit
095651be9e
1 changed files with 2 additions and 2 deletions
|
|
@ -213,7 +213,7 @@ def has_request_context() -> bool:
|
|||
|
||||
.. versionadded:: 0.7
|
||||
"""
|
||||
return _cv_app.get(None) is not None
|
||||
return _cv_request.get(None) is not None
|
||||
|
||||
|
||||
def has_app_context() -> bool:
|
||||
|
|
@ -223,7 +223,7 @@ def has_app_context() -> bool:
|
|||
|
||||
.. versionadded:: 0.9
|
||||
"""
|
||||
return _cv_request.get(None) is not None
|
||||
return _cv_app.get(None) is not None
|
||||
|
||||
|
||||
class AppContext:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue