Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

save changes flask sqlalchemy

#When updating a JSON(B) attribute I think you might need to flag it as modified
from sqlalchemy.orm.attributes import flag_modified

custObj.contextjason = { 'foo':'bar', 'so':'be it'}
flag_modified(custObj, "contextjason")
db.session.commit()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #save #flask #sqlalchemy
ADD COMMENT
Topic
Name
9+9 =