Cross-organizer acceptance

This commit is contained in:
Raphael Michel
2019-09-18 19:37:56 +02:00
parent c68f715e07
commit e37d85f517
3 changed files with 15 additions and 5 deletions

View File

@@ -534,8 +534,7 @@ class PaymentStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
if request.POST.get("giftcard") and request.POST.get("payment") == "giftcard":
# TODO: cross-organizer acceptance, …
try:
gc = GiftCard.objects.get(
issuer=request.organizer,
gc = request.organizer.accepted_gift_cards.get(
secret=request.POST.get("giftcard")
)
if gc.currency != request.event.currency: