From a8785d186e412e72b067954b1b477fe731957136 Mon Sep 17 00:00:00 2001 From: Peter Woo Date: Tue, 28 Mar 2017 10:44:33 -0700 Subject: [PATCH] Check against None for district (can be 0) --- call_server/political_data/countries/us.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/call_server/political_data/countries/us.py b/call_server/political_data/countries/us.py index f7e06f1b..98591bf7 100644 --- a/call_server/political_data/countries/us.py +++ b/call_server/political_data/countries/us.py @@ -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))