forked from CGM_Public/pretix_original
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."))
|
messages.error(request, _("You cannot pay with gift cards when buying a gift card."))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if not request.POST.get("giftcard"):
|
||||||
|
messages.error(request, _("Please enter the code of your gift card."))
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
gc = self.event.organizer.accepted_gift_cards.get(
|
gc = self.event.organizer.accepted_gift_cards.get(
|
||||||
secret=request.POST.get("giftcard").strip()
|
secret=request.POST.get("giftcard").strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user