Skip to content

Commit

Permalink
Add election results to select_related call on BallotViewSet
Browse files Browse the repository at this point in the history
  • Loading branch information
VirginiaDooley committed Sep 11, 2023
1 parent 9057482 commit 3476352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ynr/apps/elections/api/next/api_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class BallotViewSet(viewsets.ReadOnlyModelViewSet):
lookup_value_regex = r"(?!\.json$)[^/]+"
queryset = (
extra_models.Ballot.objects.select_related(
"election", "post", "replaces", "replaced_by"
"election", "post", "replaces", "replaced_by", "resultset"
)
.prefetch_related(
Prefetch(
Expand Down

0 comments on commit 3476352

Please sign in to comment.