Fix duplicate validation errors for Project deploy keys
What does this MR do and why?
Fixes duplicate validation happening for deploy_keys_projects
association when a DeployKey is created for a project.
Screenshots or screen recordings
Before: https://gitlab.com/gitlab-org/gitlab/uploads/9823dcdebaddbc1ac12c18d9ed67411d/image.png
How to set up and validate locally
- Set a
Maximum allowed lifetime for SSH keys
underadmin/application_settings/general
- Try creating a project deploy key following steps from doc
- Validation error shown in the UI should have repeated messages from the model associations.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #378365 (closed)
Edited by Bala Kumar