code4romania / code4romania/paul

No warning/error appears when importing a CSV with multiple columns with the same name

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
back-end bug :bug:
Dominant language
Python
Stars
4
Forks
1
PR merge metrics
No merged PRs in 30d

Description

When trying to upload a CSV with multiple columns using the same name, the table is created with all the columns up to the second same-named column. An error is displayed, but it doesn't help the user figure out what happened.

**Expected:**
1. A user tries to upload a table that has two columns named "phone"
2. When pressing continue, the two identical columns are highlighted

**Actual:**
1. A user tries to upload a table that has two columns named "phone"
2. When pressing continue, an error is displayed: `Something went wrong`
- in the background, the table has been created
- the new table has all the columns up to the second same-named column
4. When pressing continue a second time, a different error is displayed: `This table name is already being used`

Sample CSV: [sample.csv](https://github.com/code4romania/paul/files/12258879/sample.csv)

Screenshot of the first press of `Continue`:
![Screenshot 2023-08-04 at 11 42 36](https://github.com/code4romania/paul/assets/2820084/aeefa926-5f5f-414c-b071-77ed14b73560)

Screenshot of the second press of `Continue`:
![Screenshot 2023-08-04 at 11 42 43](https://github.com/code4romania/paul/assets/2820084/7c9a7ce4-3a77-4fdd-a114-787f402bd0e9)

Screenshot of the table structure:
![Screenshot 2023-08-04 at 11 48 10](https://github.com/code4romania/paul/assets/2820084/37a6a6f1-d9d1-4cf7-ab46-59abfa256f49)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.