Skip to content

Commit 244ffa4

Browse files
authored
Merge pull request #168 from openstates/clean-multi-whitespce-from-query
Remove extra whitespace from query
2 parents 51f6236 + 440f428 commit 244ffa4

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

Diff for: CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 6.21.4 - Mar 11, 2025
4+
* Remove extra whitespace from query value
5+
36
## 6.21.3 - Mar 3, 2025
47

58
* Purge Committees to database by default

Diff for: openstates/importers/base.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import glob
44
import json
55
import logging
6+
import re
67
import typing
78
from datetime import datetime
89
from django.db.models import Q, Model
@@ -578,6 +579,7 @@ def resolve_person(
578579
if list(spec.keys()) == ["name"]:
579580
# if we're just resolving on name, include other names and family name
580581
name = spec["name"]
582+
name = re.sub(r"\s+", " ", name)
581583
spec = (
582584
Q(name__iexact=name)
583585
| Q(other_names__name__iexact=name)

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "openstates"
3-
version = "6.21.3"
3+
version = "6.21.4"
44
description = "core infrastructure for the openstates project"
55
authors = ["James Turk <[email protected]>"]
66
license = "MIT"

0 commit comments

Comments
 (0)