Commit 27219914 authored by Jamesie Pic's avatar Jamesie Pic

Performance

parent ce5bf7f6
......@@ -61,7 +61,7 @@ class ProposalViewSet(viewsets.ReadOnlyModelViewSet):
API endpoint that allows proposals to be viewed.
"""
queryset = Proposal.objects.all()
queryset = Proposal.objects.select_related('dossier')
serializer_class = ProposalSerializer
filter_backends = (
......@@ -103,7 +103,7 @@ class VoteViewSet(viewsets.ReadOnlyModelViewSet):
API endpoint that allows proposals to be viewed.
"""
queryset = Vote.objects.all()
queryset = Vote.objects.select_related('representative', 'proposal')
serializer_class = VoteSerializer
filter_backends = (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment