fix public will not be reused as public key after deleting as deploy key (#5671) (#5685)

This commit is contained in:
Lunny Xiao 2019-01-10 22:23:05 +08:00 committed by techknowlogick
parent 30560b0f9b
commit 1c4293b37f
1 changed files with 5 additions and 0 deletions

View File

@ -826,6 +826,11 @@ func DeleteDeployKey(doer *User, id int64) error {
if err = deletePublicKeys(sess, key.KeyID); err != nil {
return err
}
// after deleted the public keys, should rewrite the public keys file
if err = rewriteAllPublicKeys(sess); err != nil {
return err
}
}
return sess.Commit()