fix: use standard method to get _doc_before_save
This commit is contained in:
@@ -164,7 +164,7 @@ class PromotionalScheme(Document):
|
|||||||
docnames = []
|
docnames = []
|
||||||
|
|
||||||
# If user has changed applicable for
|
# 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
|
return
|
||||||
|
|
||||||
docnames = frappe.get_all("Pricing Rule", filters={"promotional_scheme": self.name})
|
docnames = frappe.get_all("Pricing Rule", filters={"promotional_scheme": self.name})
|
||||||
|
|||||||
Reference in New Issue
Block a user