Check Event.presale_is_running in more places

This commit is contained in:
Raphael Michel
2017-05-10 15:04:01 +02:00
parent 74259bd4c6
commit 36215a989a
2 changed files with 5 additions and 1 deletions

View File

@@ -22,6 +22,10 @@ class CheckoutView(View):
messages.error(request, _("Your cart is empty"))
return redirect(eventreverse(self.request.event, 'presale:event.index'))
if not request.event.presale_is_running:
messages.error(request, _("The presale for this event is over or has not yet started."))
return redirect(eventreverse(self.request.event, 'presale:event.index'))
cart_error = None
try:
validate_cart.send(sender=self.request.event, positions=cart_pos)