Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix error when discount_amount is 0 for taxes webhook payload

Ania Warzecha40d897f26d33
diff --git a/saleor/core/prices.py b/saleor/core/prices.py
index 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) ** -precision
if not price:
- return Decimal(0) # type: ignore[return-value]
+ return Decimal(0)
return price.quantize(number_places)