Fix AttributeError

This commit is contained in:
Raphael Michel
2019-07-08 18:25:31 +02:00
parent 2352f3b811
commit 285694955c

View File

@@ -505,7 +505,7 @@ def _check_positions(event: Event, now_dt: datetime, positions: List[CartPositio
err = err or error_messages['voucher_required']
break
if cp.item.hide_without_voucher and (cp.voucher is None or not cp.voucher.show_hidden_items or not cp.voucher.applies_to(cp.item.pk, cp.variation.pk)):
if cp.item.hide_without_voucher and (cp.voucher is None or not cp.voucher.show_hidden_items or not cp.voucher.applies_to(cp.item, cp.variation)):
delete(cp)
cp.delete()
err = error_messages['voucher_required']