Skip to content

Commit

Permalink
Check against None for district (can be 0)
Browse files Browse the repository at this point in the history
  • Loading branch information
wioux committed Mar 28, 2017
1 parent b5c1ebc commit a8785d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion call_server/political_data/countries/us.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def locate_targets(self, state=None, district=None, zipcode=None, chambers=TARGE
rep = self.get_house_member(d['state'], d['house_district'])
if rep:
house_reps.append(self.KEY_BIOGUIDE.format(**rep[0]))
elif state and district:
elif state and (district is not None):
for senator in self.get_senators(state):
senators.append(self.KEY_BIOGUIDE.format(**senator))

Expand Down

0 comments on commit a8785d1

Please sign in to comment.