Skip to content

Saving a SyncableModel does not consider update_fields w.r.t. its dirty bit #325

@bjester

Description

@bjester

Target branch: release-v0.8.x

Observed behavior

When the save method of a model is called, the logic of SyncableModel.save does not consider whether the method was called with a list of update_fields. In most cases, this means the model's dirty bit (_morango_dirty_bit) becomes out-of-sync with the data being stored on it.

Expected behavior

The logic of SyncableModel.save adds the dirty bit field to the update_fields list, if present, to ensure the dirty bit is always saved if it is updated.

User-facing consequences

This can cause strange overwrite behaviors during a sync, resulting in data loss or inconsistency

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions