Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Use smart_text
Marcin Gębala861da6561f10
diff --git a/saleor/product/models/utils.py b/saleor/product/models/utils.pyindex fcdbd3fdfa..2fb50f8662 100644--- a/saleor/product/models/utils.py+++ b/saleor/product/models/utils.py@@ -4,7 +4,7 @@ from django.utils.encoding import smart_textdef get_attributes_display_map(variant, attributes):display = {}for attribute in attributes:- value = variant.attributes.get(str(attribute.pk))+ value = variant.attributes.get(smart_text(attribute.pk))if value:choices = {smart_text(a.pk): a for a in attribute.values.all()}attr = choices.get(value)