Merge pull request #624 from Shankarv19bcr/sla-dup-val
fix: ignore current document in default SLA validation
This commit is contained in:
commit
628080301f
@ -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