fw42 / cubecomp

WCA Rubik's Cube competition website hosting
https://cubecomp.de/
MIT License
10 stars 4 forks source link

s/United States/USA #248

Open Claster opened 6 years ago

Claster commented 6 years ago

Hi,

When I imported a csv file from cubecomp.de to cubecomps.com, it showed be an error 'Unknown country "United States".' When I modified csv, replacing it with "USA", it worked. So I believe that when exporting, this country should be "USA".

fw42 commented 6 years ago

I'm using the country names from the WCA database, which also uses "United States" (not "USA"), so I think this is a bug in cubecomps.com, not a bug in cubecomp.de?

Claster commented 5 years ago

Sorry, this thread slipped out of my mind, but now my organizer used cubecomp.de for registrations once more, and I hit this bug again.

When you download the WCA database export, you will see that competitors from US have the country "USA", not "United States". https://www.worldcubeassociation.org/results/misc/export.html

@SAuroux, could you please confirm which string is expected for US competitors?

SAuroux commented 5 years ago

I think I see the problem here: cubecomp.de uses the country's "name" instead of the country's "id".

This is the same for most countries, but not for all:

SELECT * FROM Countries where id <> name

image

@fw42 so, instead of using the "name" column from the Countries table in the WCA database, you should be using the "id" column.