mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 18:51:21 +00:00
fix: handle None case for get_shipping_amount_from_rules (#19723)
This commit is contained in:
committed by
Nabin Hait
parent
f51ccbf5d4
commit
2512962f55
@@ -70,7 +70,7 @@ class ShippingRule(Document):
|
|||||||
|
|
||||||
def get_shipping_amount_from_rules(self, value):
|
def get_shipping_amount_from_rules(self, value):
|
||||||
for condition in self.get("conditions"):
|
for condition in self.get("conditions"):
|
||||||
if not condition.to_value or (flt(condition.from_value) <= value <= flt(condition.to_value)):
|
if not condition.to_value or (flt(condition.from_value) <= flt(value) <= flt(condition.to_value)):
|
||||||
return condition.shipping_amount
|
return condition.shipping_amount
|
||||||
|
|
||||||
return 0.0
|
return 0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user