Merge pull request #624 from Shankarv19bcr/sla-dup-val

fix: ignore current document in default SLA validation
This commit is contained in:
Shariq Ansari 2025-03-02 13:11:07 +05:30 committed by GitHub
commit 628080301f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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: