This commit is contained in:
Lunny Xiao 2020-02-19 23:46:14 +08:00 committed by GitHub
parent 17445bbbfa
commit 8db20e807d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1619,6 +1619,7 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
}
if err = sess.Commit(); err != nil {
sess.Close()
if len(deployKeys) > 0 {
// We need to rewrite the public keys because the commit failed
if err2 := RewriteAllPublicKeys(); err2 != nil {