Fix error in voucher CSV export

This commit is contained in:
Raphael Michel
2018-05-28 15:49:32 +02:00
parent 65a2ea3935
commit 60a3f21857

View File

@@ -65,11 +65,11 @@ class VoucherList(PaginationMixin, EventPermissionRequiredMixin, ListView):
for v in self.get_queryset(): for v in self.get_queryset():
if v.item: if v.item:
if v.variation: if v.variation:
prod = '%s %s' % (str(v.item.name), str(v.variation.name)) prod = '%s %s' % (str(v.item), str(v.variation))
else: else:
prod = '%s' % str(v.item.name) prod = '%s' % str(v.item)
elif v.quota: elif v.quota:
prod = _('Any product in quota "{quota}"').format(quota=str(v.quota.name)) prod = _('Any product in quota "{quota}"').format(uota=str(v.quota.name))
row = [ row = [
v.code, v.code,
v.valid_until.isoformat() if v.valid_until else "", v.valid_until.isoformat() if v.valid_until else "",