Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ops bug fix for businesses with parties with data issues #1509

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions solr-feeder/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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=
9 changes: 8 additions & 1 deletion solr-feeder/solr_feeder/services/colin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion solr-feeder/solr_feeder/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
Development release segment: .devN
"""

__version__ = '2.0.7' # pylint: disable=invalid-name
__version__ = '2.0.8' # pylint: disable=invalid-name
Loading