API: New implementation for cart creation (#2833)

This commit is contained in:
Raphael Michel
2022-10-10 12:59:38 +02:00
committed by GitHub
parent 6e7af4c64b
commit 38969747f4
8 changed files with 746 additions and 240 deletions

View File

@@ -1086,6 +1086,10 @@ class OrderCreateSerializer(I18nAwareModelSerializer):
seated = pos_data.get('item').seat_category_mappings.filter(subevent=pos_data.get('subevent')).exists()
if pos_data.get('seat'):
if pos_data.get('addon_to'):
errs[i]['seat'] = ['Seats are currently not supported for add-on products.']
continue
if not seated:
errs[i]['seat'] = ['The specified product does not allow to choose a seat.']
try: