Skip to content

Deserialization should clear previous_changes on models it doesn't update #113

@chrisandreae

Description

@chrisandreae

If we didn’t make changes to the model, UpdateContext doesn’t call save. If it doesn’t call save, it doesn’t clobber previous_changes on the model, so previous_changes that didn’t come from deserialization are available for the access control to look at, without much way to distinguish them.

This isn't very nice. Consider if visiting a model for deserialization should clear its previous changes regardless of whether it saves or not, thus ensuring that previous_changes throughout the tree is guaranteed to exactly represent the changes made to the tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions