Skip to content

Commit

Permalink
VA: bills: better handle action actor re: missing ChamberCode value
Browse files Browse the repository at this point in the history
  • Loading branch information
jessemortenson committed Feb 19, 2025
1 parent c3b6c63 commit 53d7665
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scrapers/va/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,15 @@ def add_actions(self, bill: Bill, legislation_id: str):
action_attr = self.categorizer.categorize(description)
classification = action_attr["classification"]

if not row["ChamberCode"] and row["ActorType"] == "Governor":
chamber = "executive"
elif row["ChamberCode"]:
chamber = self.chamber_map[row["ChamberCode"]]
else:
chamber = None
self.logger.warning(f"Encountered unexpected action actor for legislation_id {legislation_id}")
bill.add_action(
chamber=self.chamber_map[row["ChamberCode"]],
chamber=chamber,
description=description,
date=when,
classification=classification,
Expand Down

0 comments on commit 53d7665

Please sign in to comment.