Fixed a bug whereby calling 'delete_record()' on a row object caused an AttributeError.

This commit is contained in:
Jonathan Vasek
2016-02-21 00:19:49 -06:00
parent 5a59149514
commit c4d1f3f414
+1 -1
View File
@@ -2364,7 +2364,7 @@ class SQLFORM(FORM):
if deletable(record):
if ondelete:
ondelete(table, request.args[-1])
record.delete_record()
db(table[table._id.name] == request.args[-1]).delete()
if request.ajax:
# this means javascript is enabled, so we don't need to do
# a redirect