I kolben burde dette gøre tricket:
@app.teardown_appcontext
def teardown_db(exception):
db.session.commit()
db.session.close()
I kolben burde dette gøre tricket:
@app.teardown_appcontext
def teardown_db(exception):
db.session.commit()
db.session.close()