From 90ce802a33d504b9fc8437429f063ece52da53a4 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 4 Jun 2024 11:57:49 +0200 Subject: [PATCH] Item form: Prevent combining validity_mode with gift cards (#4187) --- src/pretix/control/forms/item.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pretix/control/forms/item.py b/src/pretix/control/forms/item.py index 48d910d995..bcc3038b4c 100644 --- a/src/pretix/control/forms/item.py +++ b/src/pretix/control/forms/item.py @@ -698,6 +698,14 @@ class ItemUpdateForm(I18nModelForm): 'tax_rule', _("Gift card products should use a tax rule with a rate of 0 percent since sales tax will be applied when the gift card is redeemed.") ) + if d.get('validity_mode'): + self.add_error( + 'validity_mode', + _( + "Do not set a specific validity for gift card products as it will not restrict the validity " + "of the gift card. A validity of gift cards can be set in your organizer settings." + ) + ) if d.get('admission'): self.add_error( 'admission',