Let test then!! On Thu, Apr 14, 2016 at 9:15 AM, Niphlod <niph...@gmail.com> wrote:
> I hear you and I'm happy (or not, not sure) to not being alone ranting > about web2py's code quality and lack of tests. this was a serious bug that > should have had the effect of retiring web2py's release until it was fixed > (or at least loudly advertised). > > > On Thursday, April 14, 2016 at 5:08:24 AM UTC+2, Leonel Câmara wrote: >> >> Ok I've fixed it: >> https://github.com/web2py/web2py/pull/1294 >> >> And now I hate you guys with a tremendous passion. It took me a huge >> amount of time for a fix that ended up being a oneliner. >> >> html.py is horrible, Cthulhu level horrible, it couldn't be harder to >> follow its execution flow if it had goto statements and afterwards you >> minified it. >> >> To understand the bug first you need to look at the _validate method of >> the INPUT helper. >> >> Then you also need sqlhtml.py and see that it sets some default validators >> >> Then look dal.py where those defaults are defined (no it's not inside the >> pydal package) >> >> Then you need to really understand the IS_EMPTY_OR validator which >> thankfully I do because I have been making tests for validators. >> >> Someone please contribute to the book how important the null argument is >> to IS_EMPTY_OR because otherwise you're getting a None which will be a NULL >> in the database since IS_EMPTY_OR doesn't know what kind of field it's >> dealing with. >> >> >> >> >> -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.