Refs #85 -- Do not sell tickets that are marked as inactive

This commit is contained in:
Raphael Michel
2015-08-13 11:44:18 +02:00
parent 4277e689b8
commit 56961337ae
4 changed files with 15 additions and 3 deletions

View File

@@ -208,7 +208,7 @@ class CartAdd(EventViewMixin, CartActionMixin, View):
# Fetch all quotas. If there are no quotas, this item is not allowed to be sold.
quotas = list(item.quotas.all()) if variation is None else list(variation.quotas.all())
if price is False or len(quotas) == 0:
if price is False or len(quotas) == 0 or not item.active:
self.error_message(self.error_messages['unavailable'])
continue