def get_election_votes(self, election):
        """Get all votes for this candidate in an election."""
        candidate_election = CandidateElection.objects.get(
            candidate=self, election=election
        )

        return candidate_election.votes.all()
Get all votes for this candidate in an election.