-
Notifications
You must be signed in to change notification settings - Fork 2
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
Country should default to current, not previous country #9
Comments
@AnnikaStein Problem is that the DB I use to generate this API only has this data: |
@robiningelbrecht EDIT: |
@AnnikaStein so basically I can just add |
That's how I would understand it also, yes |
@AnnikaStein Pushed fix, files are building. Will take a few hours |
Cool, thank you for the quick fix! |
Nice, thanks again! Just updated on our end as well. |
If a person gets a subid, e.g. for changing region, there would be multiple regions that could be of interest: the former one or the current one, under which they should be ranked.
I now have a case where the API returns country 'CN' while the tsv-export of the database returns 'DE', the reason probably coming from handling the subid https://github.com/thewca/worldcubeassociation.org/blob/main/app/views/persons/_details.html.erb#L12 differently.
Could you look into this? We are using your API for a fresh federal state ranking (https://github.com/AnnikaStein/WCA-German-State-Ranks) that everyone can enter independent of the country on the WCA page, hence we sometimes have some person data with a foreign country, and in rare cases, their country changed in the past. We would like to be inclusive, and not require any condition a priori here, some people live there, study there, or have any other affiliation with a federal state that is independent of citizenship.
Example: https://annikastein.github.io/WCA-German-State-Ranks/pages/by-state_bw.html which is generated from the API writes 2018XIAO03 as 'CN', while the Website writes 'DE' as country code, same for the aforementioned tsv. 'DE' would be what we want to grab, not the previous country iso that refers to the person's subid.
It would be great to have this data being written into the country string when using person by id (https://wca-rest-api.robiningelbrecht.be/#tag/person/operation/getPersonById). Thank you and greetings!
The text was updated successfully, but these errors were encountered: