diff options
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go index 5528a8e9d2..2d0f6fccbd 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1571,6 +1571,12 @@ func DeleteRepository(doer *User, uid, repoID int64) error { return err } + if len(repo.Topics) > 0 { + if err = removeTopicsFromRepo(sess, repo.ID); err != nil { + return err + } + } + // FIXME: Remove repository files should be executed after transaction succeed. repoPath := repo.RepoPath() removeAllWithNotice(sess, "Delete repository files", repoPath) |