[FIX] correctly determines when there is no data to read in graph view (instead of the good old crash) (addon web_graph)

bzr revid: ged@openerp.com-20140409123628-erw8dpb2l36l7hu6
This commit is contained in:
Gery Debongnie 2014-04-09 14:36:28 +02:00
parent 8c5a06655d
commit 281c19a751
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({
var self = this;
return this.perform_requests().then (function () {
var data = Array.prototype.slice.call(arguments);
self.no_data = !data[0][0].attributes.length;
self.no_data = !data[0].length;
if (self.no_data) {
return;
}