mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Allow to enable ticket downloads for pending orders
This commit is contained in:
@@ -634,7 +634,7 @@ def _perform_order(event: str, payment_provider: str, position_ids: List[str],
|
||||
email_subject, email_template, email_context,
|
||||
log_entry,
|
||||
invoices=[invoice] if invoice and event.settings.invoice_email_attachment else [],
|
||||
attach_tickets=(payment_provider == 'free')
|
||||
attach_tickets=True
|
||||
)
|
||||
except SendMailException:
|
||||
logger.exception('Order received email could not be sent')
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import logging
|
||||
import os
|
||||
from datetime import timedelta
|
||||
from decimal import Decimal
|
||||
|
||||
from django.core.files.base import ContentFile
|
||||
from django.utils.timezone import now
|
||||
@@ -155,11 +154,7 @@ def get_tickets_for_order(order):
|
||||
can_download = all([r for rr, r in allow_ticket_download.send(order.event, order=order)])
|
||||
if not can_download:
|
||||
return []
|
||||
if order.status != Order.STATUS_PAID and order.total != Decimal("0.00"):
|
||||
return []
|
||||
if (not order.event.settings.ticket_download
|
||||
or (order.event.settings.ticket_download_date is not None
|
||||
and now() < order.ticket_download_date)):
|
||||
if not order.ticket_download_available:
|
||||
return []
|
||||
|
||||
providers = [
|
||||
|
||||
Reference in New Issue
Block a user