You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An alternative would be to pass a scoped session to the ModelView. Seems to work fine for now.
defget_scoped_session(db: SQLAlchemy, **options):
"""Scoped session for flask-admin. See https://github.com/pallets-eco/flask-admin/issues/2585 """def_app_ctx_id() ->int:
"""Get the id of the current Flask application context for the session scope."""returnid(app_ctx._get_current_object()) # type: ignore[attr-defined]scope=options.pop("scopefunc", _app_ctx_id)
returnscoped_session(db.sessionmaker, scope)
Hi,
Clone this minimal repo and follow the readme to reproduce https://github.com/ddorian/admin-sqlalite-bug
You will get the following traceback
full_traceback.txt
Environment: it's all in the repo.
Regards
The text was updated successfully, but these errors were encountered: