fix: use standard method to get _doc_before_save

This commit is contained in:
ruthra kumar
2024-07-03 17:05:13 +05:30
parent 406dfd528f
commit 9d7be293ae

View File

@@ -164,7 +164,7 @@ class PromotionalScheme(Document):
docnames = []
# If user has changed applicable for
if self._doc_before_save.applicable_for == self.applicable_for:
if self.get_doc_before_save() and self.get_doc_before_save().applicable_for == self.applicable_for:
return
docnames = frappe.get_all("Pricing Rule", filters={"promotional_scheme": self.name})