[FIX] web: BufferedDataSet must update the cache when reset_ids is called

This commit is contained in:
Christophe Matthieu
2015-08-28 16:58:00 +02:00
parent 846e206182
commit c53bd36655
+2 -2
View File
@@ -817,13 +817,13 @@ var BufferedDataSet = DataSetStatic.extend({
return $.async_when({result: true}).done(callback);
},
reset_ids: function(ids, options) {
var self = this;
this.set_ids(ids);
if (!options || !options.keep_read_data) {
this.cache = {};
} else {
_.each(this.cache, function (cache) {
cache.changes = {};
cache.to_delete = false;
self._update_cache(cache.id, {'changes': {}, 'to_delete': false});
});
}
this.delete_all = false;