Hello.
crud.delete(db.comments, comment_id, redirect_after_delete,
message=T('Comment deleted'))
Everything works fine.
I enabled record versioning in my app and now I got this error:
Traceback (most recent call last):
File "/home/ksh/PycharmProjects/promo/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
File "/home/ksh/PycharmProjects/promo/web2py/applications/promedol/controllers/manage.py", line 423, in <module>
File "/home/ksh/PycharmProjects/promo/web2py/gluon/globals.py", line 417, in <lambda>
self._caller = lambda f: f()
File "/home/ksh/PycharmProjects/promo/web2py/applications/promo/controllers/manage.py", line 319, in delete_comment
message=T('Comment deleted'))
File "/home/ksh/PycharmProjects/promo/web2py/gluon/tools.py", line 5013, in delete
del table[record_id]
File "/home/ksh/venv/web2py/local/lib/python2.7/site-packages/pydal/objects.py", line 604, in __delitem__
raise SyntaxError('No such record: %s' % key)
SyntaxError: No such record: 1007911