summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go
index a16b7a86f0..ab10cb6651 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1054,6 +1054,9 @@ func createRepository(e *xorm.Session, u *User, repo *Repository) (err error) {
if _, err = e.Insert(repo); err != nil {
return err
}
+ if err = deleteRepoRedirect(e, u.ID, repo.Name); err != nil {
+ return err
+ }
// insert units for repo
var units = make([]RepoUnit, 0, len(defaultRepoUnits))