fix: sync_jobs fails

This commit is contained in:
Saqib Ansari 2021-10-02 11:34:47 +05:30
parent f8c1c73953
commit 7ac02de613
2 changed files with 4 additions and 3 deletions

View File

@ -203,10 +203,11 @@
}
],
"links": [],
"modified": "2021-07-27 11:16:45.596579",
"modified": "2021-10-02 11:32:55.556024",
"modified_by": "Administrator",
"module": "Support",
"name": "Service Level Agreement",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
@ -237,4 +238,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}
}

View File

@ -339,7 +339,7 @@ def set_documents_with_active_service_level_agreement():
def apply(doc, method=None):
# Applies SLA to document on validate
if frappe.flags.in_patch or frappe.flags.in_install or frappe.flags.in_setup_wizard or \
if frappe.flags.in_patch or frappe.flags.in_migrate or frappe.flags.in_install or frappe.flags.in_setup_wizard or \
doc.doctype not in get_documents_with_active_service_level_agreement():
return