Don't ignore free price input in the cross-selling step in an event series (issue #4850) (#4933)

This commit is contained in:
Mira
2025-03-19 10:26:37 +01:00
committed by GitHub
parent 67b65bf67d
commit b7caf7769e

View File

@@ -158,11 +158,13 @@ def _item_from_post_value(request, key, value, voucher=None, voucher_ignore_if_r
return
subevent = None
prefix = ''
if key.startswith('subevent_'):
try:
parts = key.split('_', 2)
subevent = int(parts[1])
key = parts[2]
prefix = f'subevent_{subevent}_'
except ValueError:
pass
elif 'subevent' in request.POST:
@@ -175,7 +177,7 @@ def _item_from_post_value(request, key, value, voucher=None, voucher_ignore_if_r
return
parts = key.split("_")
price = request.POST.get('price_' + "_".join(parts[1:]), "")
price = request.POST.get(prefix + 'price_' + "_".join(parts[1:]), "")
if key.startswith('seat_'):
try: