Fix handling of empty giftcard-code

This commit is contained in:
Richard Schreiber
2025-04-30 07:15:18 +02:00
committed by GitHub
parent 013a065132
commit f4478da5ce

View File

@@ -1463,6 +1463,10 @@ class GiftCardPayment(BasePaymentProvider):
messages.error(request, _("You cannot pay with gift cards when buying a gift card."))
return
if not request.POST.get("giftcard"):
messages.error(request, _("Please enter the code of your gift card."))
return
try:
gc = self.event.organizer.accepted_gift_cards.get(
secret=request.POST.get("giftcard").strip()