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
JSON default values are returned stringified by the API #15351
Comments
@wc-davide Does this happen exclusively on |
I tried creating a Saving and reopening the field shows the default value as string on this one too: But this time there's no error/warning when creating a new item, it just doesn't seems to work (no default values): But it has data in "Edit Raw Value" (which I guess it doesn't show in the field because it can't parse it?): |
Yup! Same bug. In both cases, the default value isn't correctly cast back to JSON from the API 👍🏻 |
Linear: ENG-197 |
Describe the Bug
I created a Repeater field in directus with a default value (JSON Array) but once I save the field it converts the default value into a string.
When I try to create a new item in my collection it will then display a warning, which was added in this PR #12592
I'll also attach a screenshot of the database design of the field(MSSQL)
Creating the field with default value:
After saving this is how it looks:
MSSQL table design of the field:
To Reproduce
Errors Shown
When creating a new item in the collection:
What version of Directus are you using?
9.16.1
What version of Node.js are you using?
n/a
What database are you using?
MSSQL 2016
What browser are you using?
Brave
How are you deploying Directus?
k8s
The text was updated successfully, but these errors were encountered: