Skip to content

Commit

Permalink
GA remove district from vote names by splitting on last comma. Names …
Browse files Browse the repository at this point in the history
…are structure like "John, Jr., 55th", or the special keyword "VACANT"

This fixes the naming issue in ga noted in openstates#1397. This fixes openstates#1360.
  • Loading branch information
mshenfield committed Mar 15, 2017
1 parent 63ede99 commit 20948dd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion openstates/ga/bills.py
Expand Up @@ -190,7 +190,14 @@ def scrape(self, session, chambers):
m = methods[how]
except KeyError:
m = vote.other
m(whom['Name'])

if whom['Name'].upper() == 'VACANT':
name = whom['Name']
else:
# 'Name' contains a name followed by ", XXTH", e.g. "CALDWELL, JR., 55th"
name, _ = whom['Name'].rsplit(', ', 1)

m(name.strip())

bill.add_vote(vote)

Expand Down

0 comments on commit 20948dd

Please sign in to comment.