fix: ignore current document in default SLA validation

This commit is contained in:
Shankarv19bcr 2025-03-01 20:52:45 +05:30
parent c6854d95b3
commit 546bec984f

View File

@ -25,7 +25,7 @@ class CRMServiceLevelAgreement(Document):
if self.default:
other_slas = frappe.get_all(
"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"],
)
if other_slas: