Hello,
If I change erase those line (in red) in /gluon/sqlhtml.py
if not self.ignore_rw and not self.table[fieldname].writable:
### this happens because FROM has no knowledge of writable
### and thinks that a missing boolean field is a None
if self.table[fieldname].type == 'boolean' and
self.vars[fieldname]==None:
del self.vars[fieldname]
continue
It solves the problem... But I don't have clue of what the impacts are on
web2py.
I use Postgres as backend...
I will try to write a demo app to reproduce de problem...
Richard
On Tue, Feb 1, 2011 at 12:49 PM, Richard Vézina <[email protected]
> wrote:
> Hello,
>
> I am not sure where it comes from the problem I face, but for sure it comes
> from 1.91.6 because I dont have the probleme with the exact same app under
> 1.88.2.
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
>
> Traceback (most recent call last):
>
> File "/home/www-data/web2py/gluon/restricted.py", line 188, in restricted
>
> exec ccode in environment
>
> File "/home/www-data/web2py/applications/init/controllers/test.py", line
> 855, in <module>
>
> File "/home/www-data/web2py/gluon/globals.py", line 95, in <lambda>
>
> self._caller = lambda f: f()
>
> File "/home/www-data/web2py/gluon/tools.py", line 2297, in f
>
> return action(*a, **b)
>
> File "/home/www-data/web2py/applications/init/controllers/test.py", line
> 410, in update
>
> if form.accepts(request.vars, session):
>
> File "/home/www-data/web2py/gluon/sqlhtml.py", line 1091, in accepts
>
> if self.table[fieldname].type == 'boolean' and self.vars[fieldname]==None:
> KeyError: 'valid'
>
>
> I have a field name "valid" in my models... May be it conflict with the new
> DAL??
>
> Thanks
>
> Richard
>