diff options
author | Marco Badan <info@marcobadan.com> | 2017-02-07 12:26:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 12:26:00 +0100 |
commit | 9a8998fae7e8ea860e0f8f485343e226422b6f9a (patch) | |
tree | fbea869eb9f22bf9b97f441397f3f101ec538b68 /saleor/discount | |
parent | 58b360f2e9b9e85a942a20a784786fee3f20faa4 (diff) | |
download | saleor-frontend-9a8998fae7e8ea860e0f8f485343e226422b6f9a.tar.gz saleor-frontend-9a8998fae7e8ea860e0f8f485343e226422b6f9a.tar.bz2 saleor-frontend-9a8998fae7e8ea860e0f8f485343e226422b6f9a.zip |
Use smart_text for error display.
Diffstat (limited to 'saleor/discount')
-rw-r--r-- | saleor/discount/forms.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/saleor/discount/forms.py b/saleor/discount/forms.py index fb1920e0..c956696c 100644 --- a/saleor/discount/forms.py +++ b/saleor/discount/forms.py @@ -1,5 +1,5 @@ from django import forms -from django.utils import six +from django.utils.encoding import smart_text from django.utils.translation import pgettext_lazy from .models import Voucher, NotApplicable @@ -39,7 +39,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', six.text_type(e)) + self.add_error('voucher', smart_text(e)) return cleaned_data def apply_discount(self): |