Allow to unlock a payment method and redeem a voucher at the same time (#5564)

This commit is contained in:
Martin Gross
2025-10-21 17:28:33 +02:00
committed by GitHub
parent dfd52f05ff
commit 5563183255

View File

@@ -107,4 +107,10 @@ class UnlockHashView(EventViewMixin, View):
hashes = request.session.get('pretix_unlock_hashes', [])
hashes.append(kwargs.get('hash'))
request.session['pretix_unlock_hashes'] = hashes
if 'voucher' in request.GET:
return redirect_to_url(
eventreverse(self.request.event, 'presale:event.redeem') + f'?{request.META["QUERY_STRING"]}'
)
return redirect_to_url(eventreverse(self.request.event, 'presale:event.index'))