Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix error when discount_amount is 0 for taxes webhook payload
Ania Warzecha40d897f26d33
diff --git a/saleor/core/prices.py b/saleor/core/prices.pyindex 08d7c83aa1..e01dd9d61d 100644--- a/saleor/core/prices.py+++ b/saleor/core/prices.py@@ -15,7 +15,7 @@ def quantize_price(price: PriceType, currency: str) -> PriceType:precision = get_currency_precision(currency)number_places = Decimal(10) ** -precisionif not price:- return Decimal(0) # type: ignore[return-value]+ return Decimal(0)return price.quantize(number_places)