forked from CGM_Public/pretix_original
Fix exception when submitting cart positions with invalid subevent IDs
This commit is contained in:
@@ -429,7 +429,7 @@ class CartManager:
|
|||||||
|
|
||||||
for i in items:
|
for i in items:
|
||||||
if self.event.has_subevents:
|
if self.event.has_subevents:
|
||||||
if not i.get('subevent'):
|
if not i.get('subevent') or int(i.get('subevent')) not in self._subevents_cache:
|
||||||
raise CartError(error_messages['subevent_required'])
|
raise CartError(error_messages['subevent_required'])
|
||||||
subevent = self._subevents_cache[int(i.get('subevent'))]
|
subevent = self._subevents_cache[int(i.get('subevent'))]
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user