def get_candidate_delegates(self, candidate):
        """
        Get all pledged delegates for a candidate in this election.
        """
        candidate_election = CandidateElection.objects.get(
            candidate=candidate, election=self
        )

        return candidate_election.delegates.all()
def get_candidate_delegates ( self , candidate ) : candidate_election = CandidateElection . objects . get ( candidate = candidate , election = self ) return candidate_election . delegates . all ( )
Get all pledged delegates for a candidate in this election.