- changed status to resolved
Calling setdefault on a MutableDict does not trigger change
Issue #3051
resolved
I'm using flask-sqlalchemy
class Data(db.Model):
blob = db.Column(MutableDict.as_mutable(JSON), default={})
data.blob.setdefault('blah', {})
db.session.add(data)
db.session.commit()
blob does not save the changes.
Comments (2)
-
repo owner -
repo owner - Fixed bug in mutable extension where :class:
.MutableDict
did not report change events for thesetdefault()
dictionary operation. fixes#3051
→ <<cset cf1ba8e10166>>
- Fixed bug in mutable extension where :class:
- Log in to comment
.MutableDict
did not report change events for thesetdefault()
dictionary operation. fixes#3051→ <<cset aa12fdb40e66>>