mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Sendmail: Allow to attach tickets to emails
This commit is contained in:
@@ -45,7 +45,7 @@ from pretix.celery_app import app
|
||||
@app.task(base=ProfiledEventTask, acks_late=True)
|
||||
def send_mails(event: Event, user: int, subject: dict, message: dict, orders: list, items: list,
|
||||
recipients: str, filter_checkins: bool, not_checked_in: bool, checkin_lists: list,
|
||||
attachments: list = None) -> None:
|
||||
attachments: list = None, attach_tickets: bool = False) -> None:
|
||||
failures = []
|
||||
user = User.objects.get(pk=user) if user else None
|
||||
orders = Order.objects.filter(pk__in=orders, event=event)
|
||||
@@ -97,6 +97,7 @@ def send_mails(event: Event, user: int, subject: dict, message: dict, orders: li
|
||||
locale=o.locale,
|
||||
order=o,
|
||||
position=p,
|
||||
attach_tickets=attach_tickets,
|
||||
attach_cached_files=attachments
|
||||
)
|
||||
o.log_action(
|
||||
@@ -124,6 +125,7 @@ def send_mails(event: Event, user: int, subject: dict, message: dict, orders: li
|
||||
event,
|
||||
locale=o.locale,
|
||||
order=o,
|
||||
attach_tickets=attach_tickets,
|
||||
attach_cached_files=attachments
|
||||
)
|
||||
o.log_action(
|
||||
|
||||
Reference in New Issue
Block a user