flask-sqlalchemy-session icon indicating copy to clipboard operation
flask-sqlalchemy-session copied to clipboard

Remove unnecessary usage of app_ctx_stack

Open vincent-olivert-riera opened this issue 3 years ago • 1 comments
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

vincent-olivert-riera avatar Sep 19 '22 07:09 vincent-olivert-riera

I wish this would merge.. the warnings I'm getting are an annoyance.

blockjon-dd avatar Mar 31 '23 15:03 blockjon-dd