diff options
author | Unknwon <u@gogs.io> | 2015-09-01 11:43:53 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-01 11:43:53 -0400 |
commit | 398569f6f8c9636a7497a250f02e9c6b0a27ea9a (patch) | |
tree | e706abe838eb5311c02cf47e5e5b99a9c221090e /routers/api | |
parent | dde9ace91b3e492386d4b31996ae970f5c9c10bd (diff) | |
download | gitea-398569f6f8c9636a7497a250f02e9c6b0a27ea9a.tar.gz gitea-398569f6f8c9636a7497a250f02e9c6b0a27ea9a.zip |
#1021 Forked repo unavailable after deleting original repo
Diffstat (limited to 'routers/api')
-rw-r--r-- | routers/api/v1/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo.go b/routers/api/v1/repo.go index 9126ba3769..6e883a2084 100644 --- a/routers/api/v1/repo.go +++ b/routers/api/v1/repo.go @@ -151,7 +151,7 @@ func createRepo(ctx *middleware.Context, owner *models.User, opt api.CreateRepoO } else { log.Error(4, "CreateRepository: %v", err) if repo != nil { - if err = models.DeleteRepository(ctx.User.Id, repo.ID, ctx.User.Name); err != nil { + if err = models.DeleteRepository(ctx.User.Id, repo.ID); err != nil { log.Error(4, "DeleteRepository: %v", err) } } @@ -256,7 +256,7 @@ func MigrateRepo(ctx *middleware.Context, form auth.MigrateRepoForm) { repo, err := models.MigrateRepository(ctxUser, form.RepoName, form.Description, form.Private, form.Mirror, remoteAddr) if err != nil { if repo != nil { - if errDelete := models.DeleteRepository(ctxUser.Id, repo.ID, ctxUser.Name); errDelete != nil { + if errDelete := models.DeleteRepository(ctxUser.Id, repo.ID); errDelete != nil { log.Error(4, "DeleteRepository: %v", errDelete) } } |