Skip to content

Commit

Permalink
Merge pull request #116 from open-austin/lazarus1331/115
Browse files Browse the repository at this point in the history
#115: added handler for sync bill error
  • Loading branch information
lazarus1331 authored May 8, 2019
2 parents 23e7ea7 + 5c8264e commit ac0ee42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/influencetx/openstates/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def deserialize_subject_tags(subject_list):
]

def find_legislator_by_last_name(chamber, name):
# LOG.warn(f"Finding Legislator: {name}, in {chamber}")
try:
legislator = Legislator.objects.get(
chamber=chamber,
Expand All @@ -154,7 +155,10 @@ def find_legislator_by_last_name(chamber, name):
)
except:
legislator = None

except Legislator.MultipleObjectsReturned:
legislator = None
LOG.warn(f"too many: {name}, in {chamber}")

return legislator


Expand Down

0 comments on commit ac0ee42

Please sign in to comment.