Always keep the oldest timestamp

The optimistic lock should be checked with the oldest timestamp to be safer.

issue2687
review21491002
This commit is contained in:
Cédric Krier committed 2015-10-18 16:53:47 +02:00
1 parent 3911a50c3e
commit cb69ab8024
1 file changed
+4 -1
+4 -1
View File
@@ -688,7 +688,10 @@
}
value = values[name];
if (name == '_timestamp') {
this._timestamp = value;
// Always keep the older timestamp
if (!this._timestamp) {
this._timestamp = value;
}
continue;
}
if (!(name in this.model.fields)) {