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

@@ -80,6 +80,9 @@ def check_positions(event, dt, positions, quotas_locked):
err = None
for i, cp in enumerate(positions):
if not cp.item.active:
err = err or error_messages['unavailable']
continue
quotas = list(cp.item.quotas.all()) if cp.variation is None else list(cp.variation.quotas.all())
if cp.expires >= dt:
# Other checks are not necessary