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

when indexing float, use repr rather than str to have better precision


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34572 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ddd5c853
......@@ -54,7 +54,9 @@ def SQLVar_render(self, md):
if v[-1:]=='L':
v=v[:-1]
atof(v)
else: v=str(float(v))
# ERP5 patch, we use repr that have better precision than str for
# floats
else: v=repr(float(v))
except:
if not v and args.has_key('optional') and args['optional']:
return 'null'
......
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