From d6d8903d13e0011b34eda548bad249ec9ed66cf8 Mon Sep 17 00:00:00 2001 From: Assem Bahnasy Date: Thu, 14 Aug 2025 16:05:09 +0300 Subject: [PATCH] style: Apply ruff formatting --- erpnext/accounts/doctype/pricing_rule/utils.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index de63ec3a8c4..fde3b9e48dd 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -583,11 +583,7 @@ def apply_pricing_rule_on_transaction(doc): if not d.get(pr_field): continue - if ( - d.validate_applied_rule - and doc.get(field) is not None - and doc.get(field) < d.get(pr_field) - ): + if d.validate_applied_rule and (doc.get(field) or 0) < d.get(pr_field): frappe.msgprint(_("User has not applied rule on the invoice {0}").format(doc.name)) else: if not d.coupon_code_based: