fix(bulk-update): Rollback on exceptions
This commit is contained in:
parent
ca72c772f1
commit
8a1c762a7c
1 changed files with 2 additions and 1 deletions
|
|
@ -54,11 +54,12 @@ def submit_cancel_or_update_docs(doctype, docnames, action='submit', data=None):
|
|||
message = _('Updating {0}').format(doctype)
|
||||
else:
|
||||
failed.append(d)
|
||||
|
||||
frappe.db.commit()
|
||||
show_progress(docnames, message, i, d)
|
||||
|
||||
except Exception:
|
||||
failed.append(d)
|
||||
frappe.db.rollback()
|
||||
|
||||
return failed
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue