mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
fix: added exception handling on service level agreement apply hook
This commit is contained in:
@@ -495,6 +495,7 @@ def apply(doc, method=None):
|
|||||||
# Applies SLA to document on validate
|
# Applies SLA to document on validate
|
||||||
flags = frappe.local.flags
|
flags = frappe.local.flags
|
||||||
|
|
||||||
|
try:
|
||||||
if (
|
if (
|
||||||
flags.in_patch
|
flags.in_patch
|
||||||
or flags.in_migrate
|
or flags.in_migrate
|
||||||
@@ -511,6 +512,8 @@ def apply(doc, method=None):
|
|||||||
return
|
return
|
||||||
|
|
||||||
process_sla(doc, sla)
|
process_sla(doc, sla)
|
||||||
|
except Exception:
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
def remove_sla_if_applied(doc):
|
def remove_sla_if_applied(doc):
|
||||||
|
|||||||
Reference in New Issue
Block a user