Only update Review.timestamp when saving that field
Review Request #795 — Created July 28, 2017 and updated — Latest diff uploaded
Information | |
---|---|
guest5739 | |
Review Board | |
Master | |
1a515f2... | |
Reviewers | |
demo | |
guest5739 |
A previous patch (/r/9068/) updated `Review.save` to pass along all keyword arguments, such as `update_fields`. However, we were still always updating the timestamp field on the model, even if it wasn't being saved to the database. This lead to inconsistencies between fields on objects and fields in the database, causing a test failure. We now only update the timestamp field specifically when we are updating all fields or include `timestamp` in `update_fields` so that this does not happen. Testing Done: With this patch applied, all unit tests pass. Reviewed at https://reviews.reviewboard.org/r/9070/
Testing Done:
With this patch applied, all unit tests pass.Reviewed at https://reviews.reviewboard.org/r/9070/