Browse Source

Rollback if scheduled submit/cancel failed

version-14
Nabin Hait 8 years ago
committed by GitHub
parent
commit
9bf71bba3d
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      frappe/model/document.py

+ 2
- 0
frappe/model/document.py View File

@@ -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…
Cancel
Save