Any help on this? On Mon, 18 Mar 2019, 00:31 Maurice Waka <mauricew...@gmail.com> wrote:
> This is my simple code when using to delete items from my database. > > grid = SQLFORM.grid(db.answered.author == auth.user.id, editable=False > , searchable=False, details= False, fields=None, csv=None, links=None, > create=False, field_id=None, selectable=lambda ids:delete_them(ids)) > return locals() > > > def delete_them(ids): > > if not ids: > session.flash='Please select the check-box to delete' > else: > for row in ids: > db(db.answers.id==row).delete() > pass > pass > return '' > > But I get this error: > > grid = SQLFORM.grid(db.answered.author == auth.user.id, editable=False, > searchable=False, details= False, fields=None, csv=None, links=None, > create=False, field_id=None, selectable=lambda ids:delete_them(ids)) > TypeError: __call__() takes 1 positional argument but 2 were given > > What do I do to correct this? > > Regards > > -- > 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 web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.