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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug: invalid option error when inserting to single select column #7149

Closed
1 task done
sph33r opened this issue Dec 4, 2023 · 1 comment 路 Fixed by #7170
Closed
1 task done

馃悰 Bug: invalid option error when inserting to single select column #7149

sph33r opened this issue Dec 4, 2023 · 1 comment 路 Fixed by #7170
Assignees
Milestone

Comments

@sph33r
Copy link

sph33r commented Dec 4, 2023

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Steps to reproduce ?

I don't know that you can reproduce this, it's only happening with my existing tables and if I try with a new field, it's fine. It may be related to an update with existing data.

In my base, I have several tables with single select fields. These have options like "Morning" and "Night" as the only options. I don't often insert manually into these tables but since I'm also having API issues, I have to manually insert and I'm seeing this behavior when I try to select from a drop down.

Nothing has changed in these tables for over a year, the only thing that has changed is updates to the container and unfortunately I can't be sure when it started happening.

For instance, in the above example, I click the field, it drops down and shows Morning or Night, but when I pick one, it throws this error:

nocodb-invalid-option

The logs show this :

nocodb | BadRequest [Error]: Invalid option "Morning" provided for column "starting_dose". Valid options are "'Morning', 'Night'"
nocodb | at NcError.badRequest (/usr/src/app/docker/main.js:2:989112)
nocodb | at BaseModelSqlv2.validateOptions (/usr/src/app/docker/main.js:2:533048)
nocodb | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
nocodb | at async BaseModelSqlv2.validate (/usr/src/app/docker/main.js:2:532039)
nocodb | at async BaseModelSqlv2.updateByPk (/usr/src/app/docker/main.js:2:515144)
nocodb | at async DatasService.dataUpdate (/usr/src/app/docker/main.js:2:1628472)
nocodb | at async DataAliasController.dataUpdate (/usr/src/app/docker/main.js:2:366773)

This will of course not save the field when this happens.

If I edit the field and add an optoins, save, then delete the new option, the problem goes away so there's a workaround at least.

Desired Behavior

The drop down select inserts the field I chose.

Project Details

Node: v18.17.1
Arch: x64
Platform: linux
Docker: true
RootDB: pg
PackageVersion: 0.202.9

Attachments

No response

@dstala
Copy link
Member

dstala commented Dec 5, 2023

@sph33r can you connect with us over discord. you can reach out to pranavxc#7398 on discord
@pranavxc related to the validation fix gone in 0.202.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants