Approval Process: Attach ical to approval-messages if properly configured (#4064)

This commit is contained in:
Martin Gross
2024-04-12 11:18:21 +02:00
committed by GitHub
parent 2df1585b71
commit c01855270b

View File

@@ -412,6 +412,9 @@ def approve_order(order, user=None, send_mail: bool=True, auth=None, force=False
email_subject, email_template, email_context,
'pretix.event.order.email.order_approved', user,
attach_tickets=True,
attach_ical=order.event.settings.mail_attach_ical and (
not order.event.settings.mail_attach_ical_paid_only or order.total == Decimal('0.00')
),
invoices=[invoice] if invoice and order.event.settings.invoice_email_attachment else []
)
except SendMailException: