Fix AttributeError in orders API when questions are in use

This commit is contained in:
Raphael Michel
2018-03-29 18:20:26 +02:00
parent cfbde151fa
commit 2c26ccbc72
2 changed files with 29 additions and 8 deletions

View File

@@ -50,7 +50,7 @@ class OrderViewSet(viewsets.ReadOnlyModelViewSet):
def get_queryset(self):
return self.request.event.orders.prefetch_related(
'positions', 'positions__checkins', 'positions__item', 'positions__answers', 'positions__answers__options',
'positions__answers__questions', 'fees'
'positions__answers__question', 'fees'
).select_related(
'invoice_address'
)