Skip to content

Commit

Permalink
Merge pull request #121 from openstates/stop-validating-repeat-phone-…
Browse files Browse the repository at this point in the history
…numbers

Stop validating repeat phone numbers on offices
  • Loading branch information
jessemortenson authored Jan 24, 2024
2 parents 154ebaa + c923806 commit bf11bbe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
3 changes: 3 additions & 0 deletions openstates/data/models/people_orgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,11 @@ def __str__(self):

OFFICE_CHOICES = (
("district", "District Office"),
("district-mail", "District Mailing Address"),
("capitol", "Capitol Office"),
("capitol-mail", "Capitol Mailing Address"),
("primary", "Primary Office"),
("home", "Home"),
)


Expand Down
2 changes: 1 addition & 1 deletion openstates/utils/people/lint_people.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def validate_offices(person: Person) -> list[str]:
for office in person.offices:
type_counter[office.classification] += 1
for key, value in office.dict().items():
if key == "classification" or not value:
if key == "classification" or key == "voice" or key == "fax" or not value:
continue
# reverse lookup to see if we've used this phone number/etc. before
location_str = f"{office.classification} {key}"
Expand Down
9 changes: 0 additions & 9 deletions openstates/utils/tests/test_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,6 @@ def test_validate_roles_retired(roles, expected):
],
[],
),
(
[
{"classification": "district", "voice": "123-444-4444"},
{"classification": "capitol", "voice": "123-444-4444"},
],
[
"Value '123-444-4444' used multiple times: district voice and capitol voice"
],
),
],
)
def test_validate_offices(offices, expected):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openstates"
version = "6.18.0"
version = "6.18.1"
description = "core infrastructure for the openstates project"
authors = ["James Turk <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit bf11bbe

Please sign in to comment.