py.eval really needs to automatically have builtins in its evaluation context...
lp bug: https://launchpad.net/bugs/922651 fixed
bzr revid: xmo@openerp.com-
20120130085557-oqmjs0owgdrwshu0
var pair = this.colors[i],
color = pair[0],
expression = pair[1];
- if (py.evaluate(expression, context)) {
+ if (py.evaluate(expression, _.extend({bool: py.bool}, context))) {
return 'color: ' + color + ';';
}
// TODO: handle evaluation errors
var pair = this.colors[i],
color = pair[0],
expression = pair[1];
- if (py.evaluate(expression, context)) {
+ if (py.evaluate(expression, _.extend({bool: py.bool}, context))) {
return 'color: ' + color + ';';
}
// TODO: handle evaluation errors