mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Fix handling of empty giftcard-code
This commit is contained in:
committed by
GitHub
parent
013a065132
commit
f4478da5ce
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user