示例#1
0
 def _check_python_code(self):
     for action in self.sudo().filtered('code'):
         msg = test_python_expr(expr=action.code.strip(), mode="exec")
         if msg:
             raise ValidationError(msg)
示例#2
0
 def _check_python_code(self):
     for record in self.sudo().filtered('compute'):
         msg = test_python_expr(expr=record.compute.strip(), mode="exec")
         if msg:
             raise ValidationError(msg)