From 66ee322d0ff749cbbc8ba382ebb89a755bed66d4 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Fri, 27 Dec 2013 15:35:08 +0100 Subject: [PATCH] [FIX] fixes a crash happening when the context of some attributes does not have a 'group_by' attribute (in the group fields of the search view) bzr revid: ged@openerp.com-20131227143508-3g04fn2s5u9vxams --- addons/web_graph/static/src/js/graph.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js index 33d17e2b059..7dc6d261b0d 100644 --- a/addons/web_graph/static/src/js/graph.js +++ b/addons/web_graph/static/src/js/graph.js @@ -224,7 +224,9 @@ instance.web_graph.Graph = instance.web.Widget.extend({ _.each(g.children, function (g) { if (g.attrs.context) { var field_id = py.eval(g.attrs.context).group_by; - self.important_fields.push(field_id); + if (field_id) { + self.important_fields.push(field_id); + } } }); });