This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Submitted facilities are frequently throwing the country code error,
which indicates that the geocoding process has returned a result that
doesn't contain the country which the contributor has submitted for the
facility.
There are two primary instances where this is occurring:
The returned geocoding result is imprecise and contains no country
code at all. In this case, we will now accept this as a valid result.
There are multiple results returned, and although the top result
has an invalid code, another result contains the correct country code.
In this case, we will now select the result with the correct country
code. (If there are both a result with a correct country code and an
inexact result, we prefer the correct country code.)
We will still return a geocoding error if all results include
non-matching country codes.
Connects Client #62
Notes
I added additional mock data for geocoding responses in the test suite.
Testing Instructions
./scripts/resetdb
has been run../scripts/server
and upload facilities which previous threw geocoding errors.oar-country-geocode-errors.csv
Checklist
fixup!
commits have been squashed