In the past DAL was accepting comma and replace by point before insert decimal result

39 views
Skip to first unread message

Richard

unread,
Aug 4, 2017, 3:40:33 PM8/4/17
to web2py-d...@googlegroups.com
Hello,

I think I found a bug or at least a regression... I am pretty sure that in the past DAL was accepting "," as a decimal mark and replace it by "." before insert input data... This appears to be not longer the case...

It now trigger this error : 

<class 'psycopg2.ProgrammingError'> INSERT has more expressions than target columns LINE 1: ...','||',10,2E10+8,'2017-08-04',1814,'','',NULL,1,1,'2017-08-0... ^

I guess it related to decimal/numeric validation.

Even if it may not have been intent to be supported in the past, I am pretty sure that the fact that inputing a comma instead of a point shouldn't be triggering such error as this input comma should be escape (at least) and not failed without return a validator error message to the end user...

God damn it, I shout it over web2py-users... :(

Note : This is present in the last version 2.15.2 and was also there in 2.14.6...


Richard Vézina

unread,
Aug 4, 2017, 4:25:21 PM8/4/17
to web2py-d...@googlegroups.com
I am not sure if this was how it works and for some reason not available for postgres adapter anymore : https://github.com/web2py/pydal/blob/a7b7e4c11604d0b8b2de46e832469b78bfd7a1cf/pydal/parsers/sqlite.py#L19

Richard

--
-- mail from:GoogleGroups "web2py-developers" mailing list
make speech: web2py-developers@googlegroups.com
unsubscribe: web2py-developers+unsubscribe@googlegroups.com
details : http://groups.google.com/group/web2py-developers
the project: http://code.google.com/p/web2py/
official : http://www.web2py.com/
---
You received this message because you are subscribed to the Google Groups "web2py-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard Vézina

unread,
Aug 7, 2017, 9:17:47 AM8/7/17
to web2py-d...@googlegroups.com
UP!
Reply all
Reply to author
Forward
0 new messages