Only update Review.timestamp when saving that field

Review Request #9070 - Created July 11, 2017 and submitted

Barret Rennie
Review Board
release-3.0.x
a97a886...
reviewboard

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.

With this patch applied, all unit tests pass.

Barret Rennie
Barret Rennie
Christian Hammond
  1. Ship It!
  2. 
      
Barret Rennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (1a515f2)
Loading...