mirror of
https://github.com/pretix/pretix.git
synced 2026-05-10 16:04:02 +00:00
Fix voucher item validation
This commit is contained in:
@@ -331,7 +331,7 @@ class Voucher(LoggedModel):
|
|||||||
if item:
|
if item:
|
||||||
raise ValidationError(_('You cannot select a quota and a specific product at the same time.'))
|
raise ValidationError(_('You cannot select a quota and a specific product at the same time.'))
|
||||||
elif item:
|
elif item:
|
||||||
if item.require_bundling or item.category.is_addon:
|
if item.require_bundling or (item.category_id and item.category.is_addon):
|
||||||
raise ValidationError(_('You cannot select a product that is only available as an add-on product or '
|
raise ValidationError(_('You cannot select a product that is only available as an add-on product or '
|
||||||
'as part of a bundle, since vouchers cannot be applied to add-on products or '
|
'as part of a bundle, since vouchers cannot be applied to add-on products or '
|
||||||
'bundled products.'))
|
'bundled products.'))
|
||||||
|
|||||||
Reference in New Issue
Block a user