From d775a845633dfdd25a66c9a70786175c4bddf829 Mon Sep 17 00:00:00 2001 From: Jesse Mortenson Date: Thu, 7 Nov 2024 18:32:05 -0600 Subject: [PATCH] Events: importer matches incoming events to NON-deleted existing events --- CHANGELOG.md | 4 ++++ openstates/importers/events.py | 1 + pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca26bd0f..ae281a68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 6.20.11 - Nov 7, 2024 + +* Events import: ignore deleted events when matching incoming events to existing. + ## 6.20.10 - Nov 7, 2024 * Add additional log info re: archiving scrape files to cloud storage diff --git a/openstates/importers/events.py b/openstates/importers/events.py index 90165a08..e59acae8 100644 --- a/openstates/importers/events.py +++ b/openstates/importers/events.py @@ -63,6 +63,7 @@ def get_object(self, event: _JsonDict) -> Event: "start_date": event["start_date"], "end_date": event["end_date"], "jurisdiction_id": self.jurisdiction_id, + "deleted": False, # no need to match existing deleted events if this is new/incoming } return self.model_class.objects.get(**spec) diff --git a/pyproject.toml b/pyproject.toml index 821f34fc..7f5571f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "openstates" -version = "6.20.10" +version = "6.20.11" description = "core infrastructure for the openstates project" authors = ["James Turk "] license = "MIT"