Skip to content

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

Remove runtime warning

jxltom21fe30018339
diff --git a/templates/product/_items.html b/templates/product/_items.html
index c4b08ba7ae..ab31b80e14 100644
--- a/templates/product/_items.html
+++ b/templates/product/_items.html
@@ -21,7 +21,7 @@
<div class="panel-footer">
{% if availability.available %}
{% price_range availability.price_range %}
- {% if availability.discount %}
+ {% if availability.discount != None %}
{% if availability.price_range_undiscounted.start != availability.price_range.start %}
<div class="product-list__sale">
<svg data-src="{% static "images/sale-bg.svg" %}" />
diff --git a/templates/product/details.html b/templates/product/details.html
index 4e0d6c3ac2..9d47911156 100644
--- a/templates/product/details.html
+++ b/templates/product/details.html
@@ -130,7 +130,7 @@
{% else %}
<h2 class="product__info__price">
<span>{% price_range availability.price_range %}</span>
- {% if availability.discount %}
+ {% if availability.discount != None %}
<small class="product__info__price__undiscounted">
{% price availability.price_range_undiscounted %}
</small>