Add missed return after ctx.ServerError
(#31130)
(cherry picked from commit b6f15c7948ac3d09977350de83ec91d5789ea083)
This commit is contained in:
parent
ca0921a95a
commit
344bf48c9b
@ -383,6 +383,7 @@ func CreatePushMirror(ctx *context.APIContext, mirrorOption *api.CreatePushMirro
|
|||||||
if err = mirror_service.AddPushMirrorRemote(ctx, pushMirror, address); err != nil {
|
if err = mirror_service.AddPushMirrorRemote(ctx, pushMirror, address); err != nil {
|
||||||
if err := repo_model.DeletePushMirrors(ctx, repo_model.PushMirrorOptions{ID: pushMirror.ID, RepoID: pushMirror.RepoID}); err != nil {
|
if err := repo_model.DeletePushMirrors(ctx, repo_model.PushMirrorOptions{ID: pushMirror.ID, RepoID: pushMirror.RepoID}); err != nil {
|
||||||
ctx.ServerError("DeletePushMirrors", err)
|
ctx.ServerError("DeletePushMirrors", err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
ctx.ServerError("AddPushMirrorRemote", err)
|
ctx.ServerError("AddPushMirrorRemote", err)
|
||||||
return
|
return
|
||||||
|
@ -94,6 +94,7 @@ func UnadoptedRepos(ctx *context.Context) {
|
|||||||
repoNames, count, err := repo_service.ListUnadoptedRepositories(ctx, q, &opts)
|
repoNames, count, err := repo_service.ListUnadoptedRepositories(ctx, q, &opts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.ServerError("ListUnadoptedRepositories", err)
|
ctx.ServerError("ListUnadoptedRepositories", err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
ctx.Data["Dirs"] = repoNames
|
ctx.Data["Dirs"] = repoNames
|
||||||
pager := context.NewPagination(count, opts.PageSize, opts.Page, 5)
|
pager := context.NewPagination(count, opts.PageSize, opts.Page, 5)
|
||||||
|
@ -840,6 +840,7 @@ func ActivateEmail(ctx *context.Context) {
|
|||||||
if email := user_model.VerifyActiveEmailCode(ctx, code, emailStr); email != nil {
|
if email := user_model.VerifyActiveEmailCode(ctx, code, emailStr); email != nil {
|
||||||
if err := user_model.ActivateEmail(ctx, email); err != nil {
|
if err := user_model.ActivateEmail(ctx, email); err != nil {
|
||||||
ctx.ServerError("ActivateEmail", err)
|
ctx.ServerError("ActivateEmail", err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Trace("Email activated: %s", email.Email)
|
log.Trace("Email activated: %s", email.Email)
|
||||||
|
@ -569,6 +569,7 @@ func MoveIssues(ctx *context.Context) {
|
|||||||
form := &movedIssuesForm{}
|
form := &movedIssuesForm{}
|
||||||
if err = json.NewDecoder(ctx.Req.Body).Decode(&form); err != nil {
|
if err = json.NewDecoder(ctx.Req.Body).Decode(&form); err != nil {
|
||||||
ctx.ServerError("DecodeMovedIssuesForm", err)
|
ctx.ServerError("DecodeMovedIssuesForm", err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
issueIDs := make([]int64, 0, len(form.Issues))
|
issueIDs := make([]int64, 0, len(form.Issues))
|
||||||
|
@ -604,6 +604,7 @@ func DeleteFilePost(ctx *context.Context) {
|
|||||||
} else {
|
} else {
|
||||||
ctx.ServerError("DeleteRepoFile", err)
|
ctx.ServerError("DeleteRepoFile", err)
|
||||||
}
|
}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.Flash.Success(ctx.Tr("repo.editor.file_delete_success", ctx.Repo.TreePath))
|
ctx.Flash.Success(ctx.Tr("repo.editor.file_delete_success", ctx.Repo.TreePath))
|
||||||
|
Loading…
Reference in New Issue
Block a user