• Joshua Welsh's avatar
    Fixes various errors when adding deploy keys caused by not exiting the control flow. · ce4760bb
    Joshua Welsh authored
    When adding a deploy key that already exists in the project the existing key would not be returned, resulting in an attempt to create a new one, which in turn caused a 500 error due to an ActiveRecord exception.
    
    When adding a deploy key that exists within another project the key would be joined to the project, but would also attempt to create a new one, which resulted in a 400 error due to the key already existing.
    
    Fixes #22741
    Fixes #21754
    Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
    ce4760bb
deploy_keys_spec.rb 5.41 KB