Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 89fe68b

Browse files
fsaminrichardlt
authored andcommitted
fix(api): import a workflow containing an app without a repository linked (#4085)
1 parent 315856d commit 89fe68b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/api/workflow/dao_data_hook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func insertNodeHookData(db gorp.SqlExecutor, w *sdk.Workflow, n *sdk.Node) error
4242

4343
if model.Name == sdk.RepositoryWebHookModelName || model.Name == sdk.GitPollerModelName {
4444
if n.Context.ApplicationID == 0 || w.Applications[n.Context.ApplicationID].RepositoryFullname == "" || w.Applications[n.Context.ApplicationID].VCSServer == "" {
45-
return sdk.WrapError(sdk.ErrForbidden, "insertNodeHookData> Cannot create a git poller or repository webhook on an application without a repository")
45+
return sdk.NewErrorFrom(sdk.ErrForbidden, "cannot create a git poller or repository webhook on an application without a repository")
4646
}
4747
h.Config["vcsServer"] = sdk.WorkflowNodeHookConfigValue{
4848
Value: w.Applications[n.Context.ApplicationID].VCSServer,

0 commit comments

Comments
 (0)