Fix: DictField are always marked as changed
Only triggering _mark_as_changed on DictField if the value is actually
changed.
Limit the number of field accumulated in _changed_fields.
Change is valid but I'm curious, how did you noticed it @jaesivsm ?
Well it's a bit complex to describe without going in the specifics but I'm gonna try x)
We have a model with a field that gets set some values that shouldn't trigger a _mark_as_changed (because it's the same value). That's the issue this patch fixes.
We also have function connected through a signal that checks Document._delta (I know it's not a "public" API :/ sorry) to list the field that were changed right before the db write. Depending of the field that were changed it'll trigger various stuff. That last part was the visible symptom.
Hello @bagerard, do you think it would be possible to integrate that in the next release ?