From f106e3ce4ff6dd69c29cabb104a34640fe7cbf77 Mon Sep 17 00:00:00 2001 From: _Bastler <_Bastler@bstly.de> Date: Tue, 31 Aug 2021 20:12:10 +0200 Subject: [PATCH] update tokens only for admission tickets --- pretix_digital_items/signals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pretix_digital_items/signals.py b/pretix_digital_items/signals.py index 0b333e1..40dac30 100644 --- a/pretix_digital_items/signals.py +++ b/pretix_digital_items/signals.py @@ -12,7 +12,7 @@ def register_mail_secrets(sender, **kwargs): token_mail_format = "{name}: {secret}" if sender.settings.digitalitems_token_mail_format: token_mail_format = sender.settings.digitalitems_token_mail_format - return SimpleFunctionalMailTextPlaceholder('secrets', ['order'], lambda order: '\n' + '\n\n'.join(token_mail_format.format(secret = position.secret, name = str(position.item.name)) for position in order.positions.all()), '\nej7f73xs8vfmwvkk2p73yeve4fueq849\n\np8yct9752a897rpsmqzf7beby34a2w25\n\nwwqxtw6guy5s8c5tdarfhyez2ft2juap') + return SimpleFunctionalMailTextPlaceholder('secrets', ['order'], lambda order: '\n' + '\n\n'.join(token_mail_format.format(secret = position.secret, name = str(position.item.name)) for position in order.positions.all() if position.item.admission), '\nej7f73xs8vfmwvkk2p73yeve4fueq849\n\np8yct9752a897rpsmqzf7beby34a2w25\n\nwwqxtw6guy5s8c5tdarfhyez2ft2juap') @receiver(register_ticket_outputs, dispatch_uid="pretix_digital_items_ticket_output") def register_ticket_outputs(sender, **kwargs):