diff --git a/openstates/importers/organizations.py b/openstates/importers/organizations.py index 4b0db0b7..9394c1ff 100644 --- a/openstates/importers/organizations.py +++ b/openstates/importers/organizations.py @@ -16,8 +16,9 @@ def limit_spec(self, spec: _JsonDict) -> _JsonDict: if name: # __icontains doesn't work for JSONField ArrayField # so other_names follows "title" naming pattern - other_names = name.title().replace(" On ", " on ") + other_name_lowercase_on = name.title().replace(" On ", " on ") return Q(**spec) & ( - Q(name__iexact=name) | Q(other_names__contains=[{"name": other_names}]) + Q(name__iexact=name) + | Q(other_names__contains=[{"name": other_name_lowercase_on}]) ) return spec