On Wednesday, December 5, 2018 at 6:16:15 AM UTC-8, Maurice Waka wrote: > > I'm trying to delete a certain row among others with this code: > [...] > want to delete a specific selected row > > [image: lunch.png] > row = db(db.diary.id==request.vars.delete).delete()# deletes all > except under 'lunch' > >
When you say "deletes all except under 'lunch'", does that mean that the delete button works if you're displaying [and punching delete for] Dinner entry, but for a Lunch entry, it gives the error below? > [...] > When I want to delete any row under 'LUNCH', I get this error: > > ValueError: Invalid objectid argument string. Requires an integer or base 16 > value > > What does your view look like? Are you using javascript to do the buttons? JQuery? Also, note that request.vars are usually strings and you may need to do a string to int conversion (atoi() for C users, but int() for Python). (for dates, datetime.datetime.strptime() might be needed.) /dps -- 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.