Commit 63031499 authored by Jérome Perrin's avatar Jérome Perrin

sql_browser: nowadays Decimal module is allowed in restricted environment

since be31425e
parent d2cb31b1
#from decimal import Decimal
from decimal import Decimal
import datetime
import json
from DateTime import DateTime
......@@ -26,7 +26,7 @@ for line in data[1:]:
v = v.ISO()
elif isinstance(v, datetime.datetime):
v = v.isoformat()
elif "Decimal" in repr(v): # XXX decimal is not allowed in restricted environment
elif isinstance(v, Decimal):
v = float(v)
new_line.append(v)
new_data.append(new_line)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment