Ah yes! The _after_delete was defined the same way as _after_insert: _after_delete: lambda fields, id:
so I had to remove the id, and change it to self: *_after_delete: lambda self:* Den onsdagen den 10:e december 2014 kl. 14:38:57 UTC+1 skrev Anthony: > > Have you defined any _after_delete functions for the table in question? > > On Wednesday, December 10, 2014 4:02:58 AM UTC-5, Robin Manoli wrote: >> >> Hey, >> this happens when I try to delete a row from appadmin, or an sqlform: >> >> Traceback (most recent call last): >> File "/web2py/gluon/restricted.py", line 224, in restricted >> exec ccode in environment >> File "/web2py/applications/myapp/controllers/appadmin.py", line 671, in >> <module> >> File "/web2py/gluon/globals.py", line 392, in <lambda> >> self._caller = lambda f: f() >> File "/web2py/applications/myapp/controllers/appadmin.py", line 343, in >> update >> if form.accepts(request.vars, session): >> File "/web2py/gluon/sqlhtml.py", line 1521, in accepts >> self.table._db(qry).delete() >> File "/web2py/gluon/dal.py", line 10760, in delete >> ret and [f(self) for f in table._after_delete] >> TypeError: <lambda>() takes exactly 2 arguments (1 given) >> >> Any idea how to fix it? >> >> I'm currently using mysql, and the rocket server. >> > -- 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/d/optout.

