[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:
parent
d066478f10
commit
8347c44966
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue