Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Rename template filter
Marcin Gębalafdb0c48970e2
diff --git a/saleor/core/templatetags/attributes.py b/saleor/core/templatetags/attributes.pyindex d78ca571ab..88c825a597 100644--- a/saleor/core/templatetags/attributes.py+++ b/saleor/core/templatetags/attributes.py@@ -1,5 +1,6 @@from django.template import Library-from saleor.product.utils import get_attributes_display++from ...product.utils import get_attributes_display_mapregister = Library()@@ -7,8 +8,8 @@ ATTRIBUTE_EMPTY_VALUE = '-'@register.filter-def get_attributes_values(variant, attributes):- attr_values = get_attributes_display(variant, attributes)+def attributes_values_with_empty(variant, attributes):+ attr_values = get_attributes_display_map(variant, attributes)values = []for attribute in attributes:if attribute.pk in attr_values:diff --git a/saleor/dashboard/templates/dashboard/product/product_form.html b/saleor/dashboard/templates/dashboard/product/product_form.htmlindex 6f871abc30..23063140e7 100644--- a/saleor/dashboard/templates/dashboard/product/product_form.html+++ b/saleor/dashboard/templates/dashboard/product/product_form.html@@ -175,7 +175,7 @@href="{% url 'dashboard:variant-update' product_pk=product.pk variant_pk=variant.pk %}">{{ variant.sku }}</a></td>- {% for attr_display in variant|get_attributes_values:attributes %}+ {% for attr_display in variant|attributes_values_with_empty:attributes %}<td>{{ attr_display }}</td>