mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Waiting list: Allow to set auto-disable date (Z#23141338) (#4004)
* Waiting list: Allow to set auto-disable date (Z#23141338) * ADd warning on non-esries events
This commit is contained in:
@@ -446,6 +446,11 @@ class QuotaAvailability:
|
||||
self.results[q] = Quota.AVAILABILITY_RESERVED, 0
|
||||
|
||||
def _compute_waitinglist(self, quotas, q_items, q_vars, size_left):
|
||||
quotas = [
|
||||
q for q in quotas
|
||||
if not q.event.settings.waiting_list_auto_disable or q.event.settings.waiting_list_auto_disable.datetime(q.subevent or q.event) > now()
|
||||
]
|
||||
|
||||
events = {q.event_id for q in quotas}
|
||||
subevents = {q.subevent_id for q in quotas}
|
||||
quota_ids = {q.pk for q in quotas}
|
||||
|
||||
@@ -110,6 +110,9 @@ def assign_automatically(event: Event, user_id: int=None, subevent_id: int=None)
|
||||
continue
|
||||
if wle.subevent and not wle.subevent.presale_is_running:
|
||||
continue
|
||||
if event.settings.waiting_list_auto_disable and event.settings.waiting_list_auto_disable.datetime(wle.subevent or event) <= now():
|
||||
gone.add((wle.item, wle.variation, wle.subevent))
|
||||
continue
|
||||
if not wle.item.is_available():
|
||||
gone.add((wle.item, wle.variation, wle.subevent))
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user