Skip to content

Commit 2907646

Browse files
committed
Add Candidate county result access
1 parent c246ddc commit 2907646

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

elex4/lib/models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ class Candidate(object):
44
def __init__(self, raw_name, party):
55
self.last_name, self.first_name = [name.strip() for name in raw_name.split(",")]
66
self.party = self.__clean_party(party)
7+
self.county_results = {}
78
self.votes = 0
89

910
def add_votes(self, county, votes):
11+
self.county_results[county] = votes
1012
self.votes += votes
1113

1214
# Private methods

0 commit comments

Comments
 (0)