|
|
@ -378,7 +378,7 @@ func parseOwnerAndRepo(ctx *context.Context) (*models.User, *models.Repository) |
|
|
|
owner, err := models.GetUserByName(ctx.Params(":username")) |
|
|
|
owner, err := models.GetUserByName(ctx.Params(":username")) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
if models.IsErrUserNotExist(err) { |
|
|
|
if models.IsErrUserNotExist(err) { |
|
|
|
ctx.Handle(404, "GetUserByName", err) |
|
|
|
ctx.Handle(404, "GetUserByName", nil) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ctx.Handle(500, "GetUserByName", err) |
|
|
|
ctx.Handle(500, "GetUserByName", err) |
|
|
|
} |
|
|
|
} |
|
|
@ -388,7 +388,7 @@ func parseOwnerAndRepo(ctx *context.Context) (*models.User, *models.Repository) |
|
|
|
repo, err := models.GetRepositoryByName(owner.ID, ctx.Params(":reponame")) |
|
|
|
repo, err := models.GetRepositoryByName(owner.ID, ctx.Params(":reponame")) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
if models.IsErrRepoNotExist(err) { |
|
|
|
if models.IsErrRepoNotExist(err) { |
|
|
|
ctx.Handle(404, "GetRepositoryByName", err) |
|
|
|
ctx.Handle(404, "GetRepositoryByName", nil) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ctx.Handle(500, "GetRepositoryByName", err) |
|
|
|
ctx.Handle(500, "GetRepositoryByName", err) |
|
|
|
} |
|
|
|
} |
|
|
|