As noted in the book, the _before_ callbacks must return falsey values, or the operation will be aborted. So, you can either write a full function (that returns False) instead of using a lambda, or do something like:
lambda s: db(...).update(...) and False which will return the value False. Anthony On Tuesday, January 14, 2014 9:27:44 PM UTC-5, Apple Mason wrote: > > Yeah, that thread says to use _before_delete, and it fits this use case. > > Can you verify if what I'm seeing about the delete is correct? The > _before_delete is causing the admin panel to not delete the record for some > reason. Is it a bug? > > I'm using web2py 2.7.4 stable > > On Tuesday, January 14, 2014 9:20:27 PM UTC-5, 黄祥 wrote: >> >> for after delete callback, please check this discussion >> https://groups.google.com/forum/#!msg/web2py/M4_5THMHzH0/r9aXH-k8eJQJ >> >> best regards, >> stifan >> > -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

