use unidecode to get around stupid unicode problem in invoice worker log

This commit is contained in:
Thomas Steen Rasmussen 2016-08-23 19:29:39 +02:00
parent fa700fe610
commit 3c2860add8
2 changed files with 3 additions and 2 deletions

View file

@ -9,3 +9,4 @@ Pillow==3.2.0
qrcode==5.3 qrcode==5.3
CommonMark==0.6.4 CommonMark==0.6.4
django-bleach==0.3.0 django-bleach==0.3.0
Unidecode==0.4.19

View file

@ -10,7 +10,7 @@ from django.utils import timezone
from django.core.urlresolvers import reverse_lazy from django.core.urlresolvers import reverse_lazy
from utils.models import UUIDModel, CreatedUpdatedModel from utils.models import UUIDModel, CreatedUpdatedModel
from .managers import ProductQuerySet, OrderQuerySet from .managers import ProductQuerySet, OrderQuerySet
import hashlib, io, base64, qrcode import hashlib, io, base64, qrcode, unidecode
from decimal import Decimal from decimal import Decimal
from datetime import timedelta from datetime import timedelta
@ -379,7 +379,7 @@ class Invoice(CreatedUpdatedModel):
self.customorder.id, self.customorder.id,
self.customorder.created, self.customorder.created,
self.customorder.amount, self.customorder.amount,
self.customorder.customer, unidecode(self.customorder.customer),
) )
@property @property