Is your project Javascript or Typescript: JavaScript
Describe the bug
We have created a schema which is unique fields set to true for two fields. Is we choose Duplicate Item Line x then we get the warning message saying we have unique checks in place for some fields.
However if we do nothing and just click Save then the record saves and can be published bypassing any uniqueness checks hence causing issues in the solution.
Steps to reproduce the behavior
Create an pickem_group , save and publish
Then choose Duplicate Item on line 2 (Picture 1)
You get a warning message, good (Picture 2)
Click Create
Click Save
Go to list view and see duplicate values for both pickemGroupId and name which are unique according to the schema (Picture 3)
Click back on item
Click Publish
Still no warning or stop
Expected behaviour
At step 5 a warning should appear preventing the creation of the record
Bug report
Required System information
Describe the bug
We have created a schema which is unique fields set to true for two fields. Is we choose Duplicate Item Line x then we get the warning message saying we have unique checks in place for some fields. However if we do nothing and just click Save then the record saves and can be published bypassing any uniqueness checks hence causing issues in the solution.
Steps to reproduce the behavior
Expected behaviour
At step 5 a warning should appear preventing the creation of the record
Screenshots
Picture 1
Picture 2
Picture 3
Code snippets
pickem_group schema:
{ "kind": "collectionType", "collectionName": "pickem_groups", "info": { "singularName": "pickem-group", "pluralName": "pickem-groups", "displayName": "Pickem Group", "description": "" }, "options": { "draftAndPublish": true }, "attributes": { "pickemGroupId": { "type": "string", "required": true, "unique": true, "minLength": 5, "regex": "^[a-zA-Z0-9-]+$" }, "name": { "type": "string", "unique": true, "required": true, "minLength": 5 }, "pickemOpens": { "type": "datetime", "required": true }, "pickemCloses": { "type": "datetime", "required": true }, "event": { "type": "relation", "relation": "manyToOne", "target": "api::event.event", "inversedBy": "pickem_groups" }, "races": { "type": "relation", "relation": "oneToMany", "target": "api::race.race", "mappedBy": "pickem_group" } } }
Additional context
Add any other context about the problem here.