Skip to content

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

Fix problem with calculate discounted price

IKarbowiak4664788ebb61
diff --git a/saleor/discount/utils.py b/saleor/discount/utils.py
index 389275a031..df3099dacb 100644
--- a/saleor/discount/utils.py
+++ b/saleor/discount/utils.py
@@ -87,7 +87,7 @@ def calculate_discounted_price(
"""Return minimum product's price of all prices with discounts applied."""
if discounts:
discount_prices = list(get_product_discounts(product, discounts))
- if discounts:
+ if discount_prices:
price = min(discount(price) for discount in discount_prices)
return price