From 6609caa7dcbe438a37275cb8ed2045d2f1e8d681 Mon Sep 17 00:00:00 2001 From: Jesse Mortenson Date: Wed, 24 Jan 2024 16:49:38 -0600 Subject: [PATCH] Stop validating repeat phone numbers on offices --- openstates/data/models/people_orgs.py | 3 +++ openstates/utils/people/lint_people.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/openstates/data/models/people_orgs.py b/openstates/data/models/people_orgs.py index b5825d51f..f965fa18f 100644 --- a/openstates/data/models/people_orgs.py +++ b/openstates/data/models/people_orgs.py @@ -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") ) diff --git a/openstates/utils/people/lint_people.py b/openstates/utils/people/lint_people.py index cee7377a4..7bfa7deea 100644 --- a/openstates/utils/people/lint_people.py +++ b/openstates/utils/people/lint_people.py @@ -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}"