Order import: Respect sales channel when validating seats (#4707)

This commit is contained in:
Raphael Michel
2024-12-18 13:57:29 +01:00
committed by GitHub
parent 22906dfa77
commit 20f171b790
3 changed files with 38 additions and 11 deletions

View File

@@ -585,7 +585,7 @@ class SeatColumn(ImportColumn):
raise ValidationError(_('Multiple matching seats were found.'))
except Seat.DoesNotExist:
raise ValidationError(_('No matching seat was found.'))
if not value.is_available() or value in self._cached:
if not value.is_available(sales_channel=previous_values.get('sales_channel')) or value in self._cached:
raise ValidationError(
_('The seat you selected has already been taken. Please select a different seat.'))
self._cached.add(value)
@@ -754,11 +754,11 @@ def get_order_import_columns(event):
AttendeeState(event),
Price(event),
Secret(event),
Saleschannel(event),
SeatColumn(event),
ValidFrom(event),
ValidUntil(event),
Locale(event),
Saleschannel(event),
CheckinAttentionColumn(event),
CheckinTextColumn(event),
Expires(event),