Fix bug in previous commit

This commit is contained in:
Raphael Michel
2018-09-13 12:32:07 +02:00
parent befa6527e4
commit 10dd5278e7

View File

@@ -199,7 +199,7 @@ def approve_order(order, user=None, send_mail: bool=True, auth=None):
invoice = order.invoices.last() # Might be generated by plugin already
if order.event.settings.get('invoice_generate') == 'True' and invoice_qualified(order):
if not invoice:
generate_invoice(
invoice = generate_invoice(
order,
trigger_pdf=not order.event.settings.invoice_email_attachment or not order.email
)