fix: ignore current document in default SLA validation
This commit is contained in:
parent
c6854d95b3
commit
546bec984f
@ -25,7 +25,7 @@ class CRMServiceLevelAgreement(Document):
|
|||||||
if self.default:
|
if self.default:
|
||||||
other_slas = frappe.get_all(
|
other_slas = frappe.get_all(
|
||||||
"CRM Service Level Agreement",
|
"CRM Service Level Agreement",
|
||||||
filters={"apply_on": self.apply_on, "default": True},
|
filters={"apply_on": self.apply_on, "default": True, "name": ["!=", self.name]},
|
||||||
fields=["name"],
|
fields=["name"],
|
||||||
)
|
)
|
||||||
if other_slas:
|
if other_slas:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user