[FIX] Broken Dataset#unlink

bzr revid: fme@openerp.com-20121016093834-ulhdzbhvasw9msp5
This commit is contained in:
Fabien Meghazi 2012-10-16 11:38:34 +02:00
parent 015c07bc6f
commit 5a6158bb5f
1 changed files with 2 additions and 2 deletions

View File

@ -774,11 +774,11 @@ instance.web.DataSetSearch = instance.web.DataSet.extend({
if (self._length) {
self._length -= 1;
}
if (this.index !== null) {
if (self.index !== null) {
self.index = self.index <= self.ids.length - 1 ?
self.index : (self.ids.length > 0 ? self.ids.length -1 : 0);
}
this.trigger("dataset_changed", ids, callback, error_callback);
self.trigger("dataset_changed", ids, callback, error_callback);
});
},
size: function () {