Skip to content

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

Fix unicode error when showing voucher error message

Krzysztof Wolski3c29c4db6ca1
diff --git a/saleor/discount/forms.py b/saleor/discount/forms.py
index a9afa61619..0b11a2584c 100644
--- a/saleor/discount/forms.py
+++ b/saleor/discount/forms.py
@@ -36,7 +36,7 @@ class CheckoutDiscountForm(forms.Form):
discount = voucher.get_discount_for_checkout(self.checkout)
cleaned_data['discount'] = discount
except NotApplicable as e:
- self.add_error('voucher', str(e))
+ self.add_error('voucher', unicode(e))
return cleaned_data
def apply_discount(self):