From 38e71b89ece4b5c674c463eb87e55ceafc92cd5f Mon Sep 17 00:00:00 2001 From: NewAgeAirbender <34139325+NewAgeAirbender@users.noreply.github.com> Date: Mon, 25 Mar 2024 16:22:01 -0500 Subject: [PATCH] 6.18.4: another matching approach --- CHANGELOG.md | 5 +++++ openstates/importers/events.py | 2 +- openstates/importers/organizations.py | 2 +- pyproject.toml | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3611f49c..5e13f14e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 6.18.4 - March 25, 2024 + +* Different approach to committee name matching + + ## 6.18.3 - March 25, 2024 * Add other_names to committee matching for Event Imports diff --git a/openstates/importers/events.py b/openstates/importers/events.py index 125492f1b..645c1c90d 100644 --- a/openstates/importers/events.py +++ b/openstates/importers/events.py @@ -90,7 +90,7 @@ def prepare_for_db(self, data: _JsonDict) -> _JsonDict: if "person_id" in participant: participant["person_id"] = self.resolve_person(participant["person_id"]) elif "organization_id" in participant: - participant["organization_id"] = self.resolve_committee( + participant["organization_id"] = self.org_importer.resolve_json_id( participant["organization_id"], allow_no_match=True ) diff --git a/openstates/importers/organizations.py b/openstates/importers/organizations.py index ed3f3f5d3..d597aff4d 100644 --- a/openstates/importers/organizations.py +++ b/openstates/importers/organizations.py @@ -14,5 +14,5 @@ def limit_spec(self, spec: _JsonDict) -> _JsonDict: name = spec.pop("name", None) if name: - return Q(**spec) & Q(name=name) + return Q(**spec) & Q(name=name) & Q(other_names=name) return spec diff --git a/pyproject.toml b/pyproject.toml index c2ab76fd2..67f1ec3ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "openstates" -version = "6.18.3" +version = "6.18.4" description = "core infrastructure for the openstates project" authors = ["James Turk "] license = "MIT"