You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After migrating to Strapi v3.2.x all our models that have attribute "type": "uuid" fail for Create and Update requests. Once I removed the attribute definitions from the model settings all Create and Update requests work as expected. I believe it's because of the failing validation check.
Steps to reproduce the behavior
Define a model with an attribute with "type": "uuid"
Try to create or update an entry from this model.
The request fails with HTTP 500
You see Error: invalid.input in the logs.
Expected behavior
The request should not fail and the entry should be created in the database. I'm using Postgres default UUID generator to handle the generation part so no check or support is required on the Strapi side as long as Strapi allows this type to exist in the model. Basically return whatever is in the database.
[2020-10-12T10:17:09.055Z] error Error: invalid.input
at formatYupErrors (/srv/app/node_modules/strapi-utils/lib/validators.js:45:11)
at Object.validateEntityUpdate (/srv/app/node_modules/strapi/lib/services/entity-validator/index.js:177:65)
at Object.update (/srv/app/node_modules/strapi-plugin-content-manager/controllers/ContentManager.js:316:34)
at async /srv/app/node_modules/strapi/lib/middlewares/router/utils/routerChecker.js:79:22
at async module.exports (/srv/app/node_modules/strapi-plugin-content-manager/config/policies/routing.js:52:3)
at async /srv/app/node_modules/strapi-utils/lib/policy.js:68:5
at async /srv/app/node_modules/strapi/lib/middlewares/parser/index.js:48:23
at async /srv/app/node_modules/strapi/lib/middlewares/xss/index.js:26:9
[2020-10-12T10:17:09.055Z] debug PUT /content-manager/explorer/application::test.test/2 (57 ms) 500
System
Node.js version: 12.18.2
Yarn version: 1.22.4
Strapi version: 3.2.3
Database: Postgres
Operating system: MacOS
The text was updated successfully, but these errors were encountered:
Interesting, for me it only happens when there is an UUID attribute. Maybe you found another attribute that might cause the issue. For now I've removed all UUID fields.
Describe the bug
After migrating to Strapi v3.2.x all our models that have attribute
"type": "uuid"
fail for Create and Update requests. Once I removed the attribute definitions from the model settings all Create and Update requests work as expected. I believe it's because of the failing validation check.Steps to reproduce the behavior
"type": "uuid"
HTTP 500
Error: invalid.input
in the logs.Expected behavior
The request should not fail and the entry should be created in the database. I'm using Postgres default UUID generator to handle the generation part so no check or support is required on the Strapi side as long as Strapi allows this type to exist in the model. Basically return whatever is in the database.
Code snippets
Model Definition:
Error Logged:
System
The text was updated successfully, but these errors were encountered: