strapi / strapi

πŸš€ Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable and developer-first.
https://strapi.io
Other
60.64k stars 7.57k forks source link

fixed issue 20141 #20221

Open dplumptre opened 2 weeks ago

dplumptre commented 2 weeks ago

What does it do?

It fixes the issue #20141 which says A duplicated entry can be saved even if a unique field shares the same value as the original one #20141

Describe the technical changes you did. Basically updated the function for the clone to validate a check if there is a unique field and stop it from saving.

Why is it needed?

If it is not done people will be submitting duplicated data of what is supposed to be unique

Describe the issue you are solving.

How to test it?

Provide information about the environment and the path to verify the behaviour.

Steps to reproduce the behavior Create a Content-Type with a unique field in it Create an entry and fill the unique field Go to the List View Duplicate the entry Click "Save" Expected behavior I'm supposed to see an error on the unique field an not being able to save.

Related issue(s)/PR(s)

Let us know if this is related to any issue/pull request

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
contributor-docs ❌ Failed (Inspect) Apr 27, 2024 8:08pm
strapi-cla commented 2 weeks ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Ademola plumptre seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.