fix has_app_context and has_request_context

This commit is contained in:
David Lord 2022-07-25 07:35:17 -07:00
parent 02a0851252
commit 095651be9e
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8

View file

@ -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: