mongoengine icon indicating copy to clipboard operation
mongoengine copied to clipboard

Changes from clear() on ListField are not saved

Open joek-makewave opened this issue 1 year ago • 0 comments

class MyDoc(Document):
    things = ListField(StringField())

If I get hold of a document with some things and do

doc.things.clear()
doc.save()

things will not be emptied. If I do

doc.things = []
doc.save()

things is emptied.

joek-makewave avatar Mar 26 '24 17:03 joek-makewave