mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Fix voucher redemption and event index after c4bf73c
This commit is contained in:
@@ -195,9 +195,7 @@ class RedeemView(EventViewMixin, TemplateView):
|
||||
var.cached_availability = (Quota.AVAILABILITY_OK, 1)
|
||||
else:
|
||||
var.cached_availability = list(var.check_quotas())
|
||||
var.price = self.voucher.calculate_price(
|
||||
var.default_price if var.default_price is not None else item.default_price
|
||||
)
|
||||
var.display_price = self.voucher.calculate_price(var.price)
|
||||
|
||||
if len(item.available_variations) > 0:
|
||||
item.min_price = min([v.price for v in item.available_variations])
|
||||
|
||||
@@ -14,7 +14,6 @@ from django.views.generic import TemplateView
|
||||
|
||||
from pretix.base.models import ItemVariation
|
||||
from pretix.multidomain.urlreverse import eventreverse
|
||||
|
||||
from . import CartMixin, EventViewMixin
|
||||
|
||||
SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
|
||||
@@ -71,7 +70,6 @@ def get_grouped_items(event):
|
||||
if var.cached_availability[1] is not None else sys.maxsize,
|
||||
int(event.settings.max_items_per_order))
|
||||
display_add_to_cart = display_add_to_cart or var.order_max > 0
|
||||
var.price = var.default_price if var.default_price is not None else item.default_price
|
||||
if len(item.available_variations) > 0:
|
||||
item.min_price = min([v.price for v in item.available_variations])
|
||||
item.max_price = max([v.price for v in item.available_variations])
|
||||
@@ -105,7 +103,6 @@ class EventIndex(EventViewMixin, CartMixin, TemplateView):
|
||||
|
||||
|
||||
class EventAuth(View):
|
||||
|
||||
@method_decorator(csrf_exempt)
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user