From 281c19a751be815f353cbda10c09ac055e5d9594 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 9 Apr 2014 14:36:28 +0200 Subject: [PATCH] [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 --- addons/web_graph/static/src/js/pivot_table.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_graph/static/src/js/pivot_table.js b/addons/web_graph/static/src/js/pivot_table.js index d53c972a742..6fc9cf2b12b 100644 --- a/addons/web_graph/static/src/js/pivot_table.js +++ b/addons/web_graph/static/src/js/pivot_table.js @@ -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; }