mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Allow blocked seats to be booked in backend (#5585)
This commit is contained in:
committed by
GitHub
parent
29906c6288
commit
0b46982e6d
@@ -280,13 +280,13 @@ class Seat(models.Model):
|
||||
|
||||
def is_available(self, ignore_cart=None, ignore_orderpos=None, ignore_voucher_id=None,
|
||||
sales_channel='web',
|
||||
ignore_distancing=False, distance_ignore_cart_id=None):
|
||||
ignore_distancing=False, distance_ignore_cart_id=None, always_allow_blocked=False):
|
||||
from .orders import Order
|
||||
from .organizer import SalesChannel
|
||||
|
||||
if isinstance(sales_channel, SalesChannel):
|
||||
sales_channel = sales_channel.identifier
|
||||
if self.blocked and sales_channel not in self.event.settings.seating_allow_blocked_seats_for_channel:
|
||||
if not always_allow_blocked and self.blocked and sales_channel not in self.event.settings.seating_allow_blocked_seats_for_channel:
|
||||
return False
|
||||
opqs = self.orderposition_set.filter(
|
||||
order__status__in=[Order.STATUS_PENDING, Order.STATUS_PAID],
|
||||
|
||||
Reference in New Issue
Block a user