forked from CGM_Public/pretix_original
API: sort ordered items’ answers by questions’ position (#2182)
This commit is contained in:
committed by
GitHub
parent
15ab9c72d3
commit
24eea02e0d
@@ -216,7 +216,9 @@ class OrderViewSet(viewsets.ModelViewSet):
|
|||||||
'positions',
|
'positions',
|
||||||
opq.all().prefetch_related(
|
opq.all().prefetch_related(
|
||||||
Prefetch('checkins', queryset=Checkin.objects.all()),
|
Prefetch('checkins', queryset=Checkin.objects.all()),
|
||||||
'item', 'variation', 'answers', 'answers__options', 'answers__question', 'seat',
|
'item', 'variation',
|
||||||
|
Prefetch('answers', queryset=QuestionAnswer.objects.prefetch_related('options', 'question').order_by('question__position')),
|
||||||
|
'seat',
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user