[FIX] kanban: wrong condition to reset the dataset index
The dataset index should be reset either if the dataset is empty or the index is greater than the records size
This commit is contained in:
parent
16a969214f
commit
a218a9ed3f
|
@ -272,8 +272,10 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
||||||
return def.then(function(records) {
|
return def.then(function(records) {
|
||||||
self.dataset.ids.push.apply(self.dataset.ids, dataset.ids);
|
self.dataset.ids.push.apply(self.dataset.ids, dataset.ids);
|
||||||
groups_array[index] = new instance.web_kanban.KanbanGroup(self, records, group, dataset);
|
groups_array[index] = new instance.web_kanban.KanbanGroup(self, records, group, dataset);
|
||||||
if (!remaining--) {
|
if (self.dataset.index >= records.length){
|
||||||
self.dataset.index = self.dataset.size() ? 0 : null;
|
self.dataset.index = self.dataset.size() ? 0 : null;
|
||||||
|
}
|
||||||
|
if (!remaining--) {
|
||||||
return self.do_add_groups(groups_array);
|
return self.do_add_groups(groups_array);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue