Fixed missing check for variation.active

This commit is contained in:
Raphael Michel
2016-09-25 20:54:40 +02:00
parent a8a9db19de
commit 2a8bbb9952
3 changed files with 13 additions and 2 deletions

View File

@@ -185,7 +185,7 @@ def _check_positions(event: Event, now_dt: datetime, positions: List[CartPositio
voucherids = set()
for i, cp in enumerate(positions):
if not cp.item.active:
if not cp.item.active or (cp.variation and not cp.variation.active):
err = err or error_messages['unavailable']
cp.delete()
continue