mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
Presale: Fix booking period error message logic (Z#23115841) (#3832)
* Fix presale start and end error message logic * Improve readability
This commit is contained in:
@@ -642,10 +642,11 @@ class RedeemView(NoSearchIndexViewMixin, EventViewMixin, CartMixin, TemplateView
|
||||
context['show_cart'] = context['cart']['positions']
|
||||
return render(request, 'pretixpresale/event/voucher_form.html', context)
|
||||
|
||||
if request.event.presale_start and now() < request.event.presale_start:
|
||||
err = error_messages['not_started']
|
||||
if request.event.presale_end and now() > request.event.presale_end:
|
||||
if request.event.presale_has_ended or (request.event.presale_end and now() > request.event.presale_end):
|
||||
err = error_messages['ended']
|
||||
elif not request.event.presale_is_running or (
|
||||
request.event.presale_start and now() < request.event.presale_start):
|
||||
err = error_messages['not_started']
|
||||
|
||||
self.subevent = None
|
||||
if request.event.has_subevents:
|
||||
|
||||
Reference in New Issue
Block a user