Skip to content

Commit

Permalink
fix bug where un-repealed legislation is not reset
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Mar 27, 2024
1 parent a88c637 commit 5a461ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions peachjam/adapters/indigo.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ def update_document(self, url):
commencements_json = self.client_get(f"{url}/commencements.json").json()
field_data["commencements_json"] = commencements_json["commencements"]

if hasattr(model, "repealed") and document["repeal"]:
field_data["repealed"] = True
if hasattr(model, "repealed"):
field_data["repealed"] = bool(document["repeal"])

# the document may already be in the database, but not as the right document type.
# It's unlikely, but does happen and is confusing to debug, so let's check for it explicitly.
Expand Down

0 comments on commit 5a461ee

Please sign in to comment.