flask sqlalchemy commit does not save changes

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

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