Although the Set object is passed to the after_delete callback, you cannot retrieve the deleted records (or their IDs) because, well, they have been deleted. If you need to know which records will be deleted, you should use the before_delete callback.
Note, from the Set object, you can obtain the Query object, which you might then be able to inspect to determine the record ID if the query itself contains the ID -- see https://groups.google.com/d/msg/web2py/M4_5THMHzH0/VehdDI_Xd7MJ. Anthony On Monday, April 25, 2016 at 6:29:06 AM UTC-4, Pierre wrote: > > Hi, > > as stated in the book the function takes a single Set argument which is a > Lazy Set > > >>> db.person._after_delete.append(lambda s: pprint(s)) > > The deleted record's id is probably contained in the Set but how to extract > it from there ?. > I need this id to perform the subsequent actions > > > -- 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.

