diff --git a/solr-feeder/.env.sample b/solr-feeder/.env.sample index d52730a31..0ed9d4eaa 100644 --- a/solr-feeder/.env.sample +++ b/solr-feeder/.env.sample @@ -34,6 +34,6 @@ REGISTRIES_SEARCH_API_INTERNAL_URL= BOR_API_INTERNAL_URL= # Service Account -KEYCLOAK_AUTH_TOKEN_URL=https://dev.oidc.gov.bc.ca/auth/realms/bcregistry/protocol/openid-connect/token -BUSINESS_SEARCH_SERVICE_ACCOUNT_CLIENT_ID=nds-service-account -BUSINESS_SEARCH_SERVICE_ACCOUNT_SECRET= +KEYCLOAK_AUTH_TOKEN_URL=https://dev.loginproxy.gov.bc.ca/auth/realms/bcregistry/protocol/openid-connect/token +NDS_SERVICE_ACCOUNT_CLIENT_ID=nds-service-account +NDS_SERVICE_ACCOUNT_SECRET= diff --git a/solr-feeder/solr_feeder/services/colin.py b/solr-feeder/solr_feeder/services/colin.py index 4e88b6e4b..4b8b1017c 100644 --- a/solr-feeder/solr_feeder/services/colin.py +++ b/solr-feeder/solr_feeder/services/colin.py @@ -156,7 +156,14 @@ def get_parties(legal_type: str, identifier: str, token: str) -> tuple[list[dict if roles: # has valid roles so add party to update party['roles'] = roles - parties.append(_parse_party(party, legal_type)) + if parsed_party := _parse_party(party, legal_type): + # check to make sure it contains a person name (otherwise we will ignore this record) + # - NOTE: some records contain no organization name AND no party name + has_person_name = parsed_party['officer'].get('firstName') \ + or parsed_party['officer'].get('middleInitial') \ + or parsed_party['officer'].get('lastName') + if has_person_name: + parties.append(parsed_party) return parties, None diff --git a/solr-feeder/solr_feeder/version.py b/solr-feeder/solr_feeder/version.py index 10df538a1..c3ff888eb 100644 --- a/solr-feeder/solr_feeder/version.py +++ b/solr-feeder/solr_feeder/version.py @@ -21,4 +21,4 @@ Development release segment: .devN """ -__version__ = '2.0.7' # pylint: disable=invalid-name +__version__ = '2.0.8' # pylint: disable=invalid-name