save changes flask sqlalchemy

Solutions on MaxInterview for save changes flask sqlalchemy by the best coders in the world

showing results for - "save changes flask sqlalchemy"
Aitana
09 Jan 2019
1#When updating a JSON(B) attribute I think you might need to flag it as modified
2from sqlalchemy.orm.attributes import flag_modified
3
4custObj.contextjason = { 'foo':'bar', 'so':'be it'}
5flag_modified(custObj, "contextjason")
6db.session.commit()
7