mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
select_related order instead prefetch
This commit is contained in:
committed by
Martin Gross
parent
76ab775876
commit
0552441e4a
@@ -655,7 +655,7 @@ def _redeem_process(*, checkinlists, raw_barcode, answers_data, datetime, force,
|
|||||||
'list': MiniCheckinListSerializer(checkinlists[0]).data,
|
'list': MiniCheckinListSerializer(checkinlists[0]).data,
|
||||||
}, status=404)
|
}, status=404)
|
||||||
op_candidates = []
|
op_candidates = []
|
||||||
for op in media.linked_orderpositions.all().prefetch_related("order"):
|
for op in media.linked_orderpositions.all().select_related("order"):
|
||||||
op_candidates.append(op)
|
op_candidates.append(op)
|
||||||
if list_by_event[op.order.event_id].addon_match:
|
if list_by_event[op.order.event_id].addon_match:
|
||||||
op_candidates += list(op.addons.all())
|
op_candidates += list(op.addons.all())
|
||||||
|
|||||||
Reference in New Issue
Block a user