[FIX] fixes a crash when the graph view receives an array of values instead of a single value describing a field (addon web_graph)

bzr revid: ged@openerp.com-20140102100127-7bmviyzujjmlfg02
This commit is contained in:
Gery Debongnie 2014-01-02 11:01:27 +01:00
parent d066478f10
commit 8347c44966
1 changed files with 5 additions and 1 deletions

View File

@ -246,7 +246,11 @@ instance.web_graph.Graph = instance.web.Widget.extend({
if (g.attrs.context) {
var field_id = py.eval(g.attrs.context).group_by;
if (field_id) {
self.important_fields.push(field_id);
if (field_id instanceof Array) {
self.important_fields.concat(field_id);
} else {
self.important_fields.push(field_id);
}
}
}
});