From 790876ea5b0c996634a43185f1530fe3639c1a21 Mon Sep 17 00:00:00 2001 From: Shreyas Sojitra Date: Mon, 22 Sep 2025 18:43:28 +0530 Subject: [PATCH] fix(pricing_rule): handle dict type when checking coupon_code_based --- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 5ccb614f1b5..685759dd1f3 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -452,7 +452,7 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False): get_pricing_rule_items(pricing_rule, other_items=fetch_other_item) or [] ) - if pricing_rule.coupon_code_based == 1: + if pricing_rule.get("coupon_code_based") == 1: if not args.coupon_code: continue coupon_code = frappe.db.get_value(