Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wcivf/apps/parties/importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def add_local_party(self, row, party, ballots, file_url):
# only create local parties for ballots where a candidate is standing
# for the parent party
ballots = ballots.filter(personpost__party=party)
for post_election in ballots.distinct():
for post_election in ballots.select_related("election").distinct():
country = self.get_country(
election_type=post_election.election.election_type
)
Expand Down