Add a voucher’s comment to voucher.csv download (#1926)

This commit is contained in:
Richard Schreiber
2021-02-15 13:41:44 +01:00
committed by GitHub
parent 4db0530c09
commit f2a18325b6
2 changed files with 6 additions and 4 deletions

View File

@@ -67,7 +67,8 @@ class VoucherList(PaginationMixin, EventPermissionRequiredMixin, ListView):
headers = [
_('Voucher code'), _('Valid until'), _('Product'), _('Reserve quota'), _('Bypass quota'),
_('Price effect'), _('Value'), _('Tag'), _('Redeemed'), _('Maximum usages'), _('Seat')
_('Price effect'), _('Value'), _('Tag'), _('Redeemed'), _('Maximum usages'), _('Seat'),
_('Comment')
]
writer.writerow(headers)
@@ -92,7 +93,8 @@ class VoucherList(PaginationMixin, EventPermissionRequiredMixin, ListView):
v.tag,
str(v.redeemed),
str(v.max_usages),
str(v.seat) if v.seat else ""
str(v.seat) if v.seat else "",
str(v.comment) if v.comment else ""
]
writer.writerow(row)