Re: [web2py] Re: lambda cannot contain assignment

2014-06-13 Thread Fabiano Almeida
Hi Anthony, It worked! Now I understand better how to use callback. Thank you very much!! Fabiano. 2014-06-12 16:13 GMT-03:00 Anthony abasta...@gmail.com: lambda qset, f: f.update(cadastro=request.now if f['status'] in ['Edição', 'Enviado'] else None) -- Resources: -

[web2py] Re: lambda cannot contain assignment

2014-06-12 Thread Anthony
First, note that you are not limited to using a lambda -- you can use any function/callable. So, if you need to do an assignment, write a separate function. In this case, though, you can instead use the .update method: db.solicitacao._before_update.append(lambda qset, f: