From 8a1c762a7c9c6a7fac10ea750004cd1360304d2c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 31 Oct 2018 15:45:06 +0530 Subject: [PATCH] fix(bulk-update): Rollback on exceptions --- frappe/desk/doctype/bulk_update/bulk_update.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/desk/doctype/bulk_update/bulk_update.py b/frappe/desk/doctype/bulk_update/bulk_update.py index 023cf527be..9b9f7d7a73 100644 --- a/frappe/desk/doctype/bulk_update/bulk_update.py +++ b/frappe/desk/doctype/bulk_update/bulk_update.py @@ -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