Do not set values of keys in modified fields

review1030002
This commit is contained in:
Nicolas Évrard committed 2013-08-28 18:17:38 +02:00
1 parent 3fa650a34f
commit 4eb7307e1b
1 file changed
+7 -1
+7 -1
View File
@@ -477,6 +477,12 @@
// TODO exception
var value = id2value[id];
if (record && value) {
for (var key in this._changed) {
if (!this._changed.hasOwnProperty(key)) {
continue;
}
delete value[key];
}
record.set(value);
}
}
@@ -819,7 +825,7 @@
if (!jQuery.isEmptyObject(fields)) {
var result = true;
fields.forEach(function(field) {
if (!(field in this._loaded)) {
if (!(field in this._loaded) | !(field in this._changed)) {
result = false;
}
}.bind(this));