Browse Source

Bug fix

pull/31/head
Unknown 11 years ago
parent
commit
e251b9bbca
  1. 4
      routers/repo/repo.go

4
routers/repo/repo.go

@ -48,12 +48,10 @@ func Create(form auth.CreateRepoForm, req *http.Request, r render.Render, data b
if _, err = models.CreateRepository(user,
form.RepoName, form.Description, form.Language, form.License,
form.Visibility == "private", form.InitReadme == "on"); err == nil {
if err == nil {
r.Redirect("/"+user.Name+"/"+form.RepoName, 200)
r.Redirect("/"+user.Name+"/"+form.RepoName, 302)
return
}
}
}
if err.Error() == models.ErrRepoAlreadyExist.Error() {
data["HasError"] = true

Loading…
Cancel
Save