Allow to exclude items from ticket generation explicitly

This commit is contained in:
Raphael Michel
2019-02-01 16:48:14 +01:00
parent f77b551aa6
commit 2aa246b3d5
16 changed files with 119 additions and 78 deletions

View File

@@ -114,9 +114,7 @@ class PositionDownloadsField(serializers.Field):
if instance.order.status != Order.STATUS_PAID:
if instance.order.status != Order.STATUS_PENDING or instance.order.require_approval or not instance.order.event.settings.ticket_download_pending:
return []
if instance.addon_to_id and not instance.order.event.settings.ticket_download_addons:
return []
if not instance.item.admission and not instance.order.event.settings.ticket_download_nonadm:
if not instance.generate_ticket:
return []
request = self.context['request']