From 76a26fa815f5e07eb0757ddf10ce39d181ed43ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 28 Sep 2009 11:23:07 +0200 Subject: [PATCH] Use safe_eval --- currency.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/currency.py b/currency.py index 0d2cd53f4a..39f8560a7d 100644 --- a/currency.py +++ b/currency.py @@ -2,6 +2,7 @@ #of this repository contains the full copyright notices and license terms. "Currency" from trytond.model import ModelView, ModelSQL, fields +from trytond.tools import safe_eval import time from decimal import Decimal import datetime @@ -96,7 +97,7 @@ class Currency(ModelSQL, ModelView): ''' for currency in self.browse(cursor, user, ids): try: - grouping = eval(currency.mon_grouping) + grouping = safe_eval(currency.mon_grouping) for i in grouping: if not isinstance(i, int): return False