From 0440187e59e9f4dd139ab39886aeb87b8616c016 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 4 Feb 2019 14:07:01 +0100 Subject: [PATCH] Do not break on empty invoices Sentry PRETIXEU-S8 --- src/pretix/base/exporters/orderlist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pretix/base/exporters/orderlist.py b/src/pretix/base/exporters/orderlist.py index 22d8bf5b35..a197a9bf72 100644 --- a/src/pretix/base/exporters/orderlist.py +++ b/src/pretix/base/exporters/orderlist.py @@ -546,8 +546,8 @@ class InvoiceDataExporter(MultiSheetListExporter): _('Yes') if i.reverse_charge else _('No'), i.foreign_currency_display, i.foreign_currency_rate, - i.total_gross, - Decimal(i.total_net).quantize(Decimal('0.01')), + i.total_gross if i.total_gross else Decimal('0.00'), + Decimal(i.total_net if i.total_net else '0.00').quantize(Decimal('0.01')), ] elif sheet == 'lines': yield [