Fix allow_ignore_quota with bundled items

This commit is contained in:
Raphael Michel
2019-09-03 12:25:22 +02:00
parent 1ee352e114
commit c6265b4517

View File

@@ -794,8 +794,9 @@ class CartManager:
for b in op.bundled:
b_quotas = list(b.quotas)
if not b_quotas:
err = err or error_messages['unavailable']
available_count = 0
if not op.voucher or not op.voucher.allow_ignore_quota:
err = err or error_messages['unavailable']
available_count = 0
continue
b_quota_available_count = min(available_count * b.count, min(quotas_ok[q] for q in b_quotas))
if b_quota_available_count < b.count: