flask-sqlalchemy-session
flask-sqlalchemy-session copied to clipboard
Remove unnecessary usage of app_ctx_stack
trafficstars
This was only used to check if the application context exists, and if it didn't exist an exception was raised with an explanatory message.
Trying to access current_app._get_current_object() raises the same kind of exception with an equivalent explanatory message, therefore the usage of app_ctx_stack and the check around it was completely redundant.
Fixes issue #16 Requires PR https://github.com/dtheodor/flask-sqlalchemy-session/pull/15
I wish this would merge.. the warnings I'm getting are an annoyance.