Re-added the ability to restrict a product sale by time

This commit is contained in:
Raphael Michel
2015-12-06 18:18:54 +01:00
parent 4a1122a862
commit e70485e7fb
9 changed files with 149 additions and 22 deletions

View File

@@ -93,7 +93,7 @@ def _add_items(event: Event, items: List[Tuple[str, Optional[str], int]],
# 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 len(quotas) == 0 or not item.active:
if len(quotas) == 0 or not item.is_available():
err = err or error_messages['unavailable']
continue