mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Reduce item event queries in waitinglist assign
This commit is contained in:
committed by
GitHub
parent
5caaa8586d
commit
c925f094f2
@@ -113,6 +113,11 @@ def assign_automatically(event: Event, user_id: int=None, subevent_id: int=None)
|
|||||||
|
|
||||||
lock_objects(quotas, shared_lock_objects=[event])
|
lock_objects(quotas, shared_lock_objects=[event])
|
||||||
for wle in qs:
|
for wle in qs:
|
||||||
|
# add this event to wle.item as it is not yet cached and is needed in check_quotas
|
||||||
|
wle.item.event = event
|
||||||
|
if wle.variation:
|
||||||
|
wle.variation.item = wle.item
|
||||||
|
|
||||||
if (wle.item_id, wle.variation_id, wle.subevent_id) in gone:
|
if (wle.item_id, wle.variation_id, wle.subevent_id) in gone:
|
||||||
continue
|
continue
|
||||||
ev = (wle.subevent or event)
|
ev = (wle.subevent or event)
|
||||||
|
|||||||
Reference in New Issue
Block a user