diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-02-19 23:46:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-19 10:46:14 -0500 |
commit | 8db20e807d6a6b988857b3fe9ec05b28cf49cc13 (patch) | |
tree | 6d386140f7d3ffae86d453bdba14db55cf2e6805 /models/repo.go | |
parent | 17445bbbfadb9fc4e47df63b01c3acd77c0a90a5 (diff) | |
download | gitea-8db20e807d6a6b988857b3fe9ec05b28cf49cc13.tar.gz gitea-8db20e807d6a6b988857b3fe9ec05b28cf49cc13.zip |
Fix test (#10363)
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go index 4bb5e3eb01..ac9efaf7a1 100644 --- a/models/repo.go +++ b/models/repo.go @@ -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 { |