mirror of
https://github.com/go-gitea/gitea.git
synced 2026-06-29 20:46:36 +02:00
fix lint
This commit is contained in:
parent
d073e76c61
commit
87ec0aa320
@ -4,7 +4,6 @@
|
||||
package repo
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -460,7 +459,7 @@ func CreateProjectWorkflow(ctx *api_context.APIContext) {
|
||||
Enabled: true,
|
||||
}
|
||||
if len(workflow.WorkflowActions) == 0 {
|
||||
ctx.APIError(http.StatusUnprocessableEntity, errors.New("at least one action is required"))
|
||||
ctx.APIError(http.StatusUnprocessableEntity, "at least one action is required")
|
||||
return
|
||||
}
|
||||
if err := project_model.CreateWorkflow(ctx, workflow); err != nil {
|
||||
@ -560,7 +559,7 @@ func UpdateProjectWorkflow(ctx *api_context.APIContext) {
|
||||
workflow.WorkflowFilters = convertAPIProjectWorkflowFilters(ctx, project, workflow.WorkflowEvent, form.Filters)
|
||||
workflow.WorkflowActions = convertAPIProjectWorkflowActions(ctx, project, workflow.WorkflowEvent, form.Actions)
|
||||
if len(workflow.WorkflowActions) == 0 {
|
||||
ctx.APIError(http.StatusUnprocessableEntity, errors.New("at least one action is required"))
|
||||
ctx.APIError(http.StatusUnprocessableEntity, "at least one action is required")
|
||||
return
|
||||
}
|
||||
if err := project_model.UpdateWorkflow(ctx, workflow); err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user