Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Commit

Permalink
Elex Candidate model swapped in for #98
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Jan 26, 2016
1 parent 80d5854 commit f1d08ac
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions elections/ap.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,20 +393,18 @@ def _init_candidates(self):
for cand in candidate_list:
# Create a Candidate...
candidate = Candidate(
first_name=cand['pol_first_name'],
middle_name=cand['pol_middle_name'],
last_name=cand['pol_last_name'],
ap_race_number=self.ap_number_template % ({
'number': cand['ra_number'],
'state': cand.get('st_postal', 'None')
}),
ap_natl_number=cand['pol_nat_id'],
ap_polra_number=cand['polra_number'],
ap_pol_number=cand['pol_number'],
abbrev_name=cand['pol_abbrv'],
suffix=cand['pol_junior'],
ballotorder=cand['polra_in_order'],
candidateid=cand['polra_number'],
first=cand['pol_first_name'],
last=cand['pol_last_name'],
party=cand['polra_party'],
polid=cand['pol_nat_id'],
polnum=cand['pol_number'],
)
candidate.ap_race_number=self.ap_number_template % ({
'number': cand['ra_number'],
'state': cand.get('st_postal', 'None')
})
try:
self._races[candidate.ap_race_number].candidates.append(candidate)
except KeyError:
Expand Down Expand Up @@ -714,7 +712,6 @@ def __init__(self, client, name='20141104', results=True, delegates=False):
super(ElectionDay, self).__init__(client, name, results, delegates)



class Result(object):
"""
The vote count for a candidate in a race in a particular reporting unit.
Expand Down

0 comments on commit f1d08ac

Please sign in to comment.