-
tl;dr Pass a parameter to Use CaseWe issue special tickets (in our case tickets for angels) as well as normal tickets. For normal tickets, we want people to be able to instantly download their tickets from the order page as soon as they've paid (particularly if they pay via stripe instead of via bank transfer). For the special tickets however, we only want to send tickets via email or show them on the order page after the email has been verified (i.e., Current solutionYou will hate this, but here we go: Look at the call stack to see if the signal is called from an order page or from an email task. def allow_ticket_download_helper(event, order):
config = get_config(event)
# Only enforce this setting on customer facing order pages, not for emails
is_from_order_page = any(map(lambda frame: frame.function == 'get_context_data', inspect.stack()))
if config.get('engel_ticket:allow_ticket_download_without_email_verification'):
return True
if order.email_known_to_work or (not is_from_order_page):
return True
return filter(lambda position: not position_is_engel_ticket(event, position), order.positions.all()) Proposed solutionAdd a new optional argument to the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hmm. Yes, it would work and it would be doable, but I don't think it is a really good solution. It opens a number of new failure modes. For example, pretix contains a mechanism that prevents tickets from being attached to an email if they are to large, and there is no way to prevent that. So someone implementing the plugin signal would need to be quite careful to not build a situation where you lock users out from getting their tickets at all. Also, it makes Wouldn't just generally setting |
Beta Was this translation helpful? Give feedback.
We've discussed this internally and we do not want to make a change here and recommend that you keep your hack. We don't want to make the signal more complex and we don't want to introduce the complexity of moving the download requirement to product level.