Rollback if scheduled submit/cancel failed
This commit is contained in:
parent
171712ec87
commit
9bf71bba3d
1 changed files with 2 additions and 0 deletions
|
|
@ -999,6 +999,8 @@ def execute_action(doctype, name, action, **kwargs):
|
|||
try:
|
||||
getattr(doc, action)(**kwargs)
|
||||
except Exception:
|
||||
frappe.db.rollback()
|
||||
|
||||
# add a comment (?)
|
||||
if frappe.local.message_log:
|
||||
msg = json.loads(frappe.local.message_log[-1]).get('message')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue