[web2py] Re: table._before_insert.append() wrong behaviour?

2017-02-10 Thread Anthony
> > ret = self.table.insert(**fields) > Should probably be ret = self.table.insert(**fields) or False as we want ret (and self.accepted) to end up a boolean rather than 0. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: table._before_insert.append() wrong behaviour?

2017-02-10 Thread Leonel Câmara
Humm this may actually be considered a SQLFORM bug. Since it just puts whatever the insert returns in self.vars.id and never checks if it is actually an id or zero, zero actually means it failed because of a before_insert such as yours. The bug is here:

Re: [web2py] Re: table._before_insert.append() wrong behaviour?

2017-02-10 Thread Marvi Benedet
I think the message is misleading... 2017-02-10 13:09 GMT+01:00 Leonel Câmara : > I don't see the problem. Appadmin only checks that the insert form is > accepted which it is. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > -

[web2py] Re: table._before_insert.append() wrong behaviour?

2017-02-10 Thread Leonel Câmara
I don't see the problem. Appadmin only checks that the insert form is accepted which it is. -- 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