forked from CGM_Public/pretix_original
Implement corona-safe seating (#1685)
This commit is contained in:
@@ -889,7 +889,9 @@ class CartManager:
|
||||
available_count = 0
|
||||
|
||||
if isinstance(op, self.AddOperation):
|
||||
if op.seat and not op.seat.is_available(ignore_voucher_id=op.voucher.id if op.voucher else None, sales_channel=self._sales_channel):
|
||||
if op.seat and not op.seat.is_available(ignore_voucher_id=op.voucher.id if op.voucher else None,
|
||||
sales_channel=self._sales_channel,
|
||||
distance_ignore_cart_id=self.cart_id):
|
||||
available_count = 0
|
||||
err = err or error_messages['seat_unavailable']
|
||||
|
||||
|
||||
@@ -1375,7 +1375,7 @@ class OrderChangeManager:
|
||||
for seat, diff in self._seatdiff.items():
|
||||
if diff <= 0:
|
||||
continue
|
||||
if not seat.is_available(sales_channel=self.order.sales_channel) or diff > 1:
|
||||
if not seat.is_available(sales_channel=self.order.sales_channel, ignore_distancing=True) or diff > 1:
|
||||
raise OrderError(self.error_messages['seat_unavailable'].format(seat=seat.name))
|
||||
|
||||
if self.event.has_subevents:
|
||||
|
||||
@@ -67,6 +67,8 @@ def generate_seats(event, subevent, plan, mapping):
|
||||
update(seat, 'sorting_rank', ss.sorting_rank),
|
||||
update(seat, 'row_label', ss.row_label),
|
||||
update(seat, 'seat_label', ss.seat_label),
|
||||
update(seat, 'x', ss.x),
|
||||
update(seat, 'y', ss.y),
|
||||
])
|
||||
if updated:
|
||||
seat.save()
|
||||
@@ -82,6 +84,8 @@ def generate_seats(event, subevent, plan, mapping):
|
||||
sorting_rank=ss.sorting_rank,
|
||||
row_label=ss.row_label,
|
||||
seat_label=ss.seat_label,
|
||||
x=ss.x,
|
||||
y=ss.y,
|
||||
product=p,
|
||||
))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user