Skip to content

Commit 6f14f3b

Browse files
authored
fix(api): loading pipeline workflow holder (#5176)
1 parent 2d84513 commit 6f14f3b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

engine/api/pipeline.go

+11-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ func (api *API) updateAsCodePipelineHandler() service.Handler {
4040
return sdk.WrapError(sdk.ErrInvalidPipelinePattern, "updateAsCodePipelineHandler: Pipeline name %s do not respect pattern", p.Name)
4141
}
4242

43-
proj, err := project.Load(api.mustDB(), key, project.LoadOptions.WithClearKeys)
43+
proj, err := project.Load(api.mustDB(), key,
44+
project.LoadOptions.WithApplicationWithDeploymentStrategies,
45+
project.LoadOptions.WithPipelines,
46+
project.LoadOptions.WithEnvironments,
47+
project.LoadOptions.WithIntegrations,
48+
project.LoadOptions.WithClearKeys)
4449
if err != nil {
4550
return err
4651
}
@@ -295,7 +300,11 @@ func (api *API) getPipelineHandler() service.Handler {
295300
withWorkflows := FormBool(r, "withWorkflows")
296301
withAsCodeEvent := FormBool(r, "withAsCodeEvents")
297302

298-
proj, err := project.Load(api.mustDB(), projectKey)
303+
proj, err := project.Load(api.mustDB(), projectKey,
304+
project.LoadOptions.WithApplicationWithDeploymentStrategies,
305+
project.LoadOptions.WithPipelines,
306+
project.LoadOptions.WithEnvironments,
307+
project.LoadOptions.WithIntegrations)
299308
if err != nil {
300309
return err
301310
}

engine/api/workflow/dao.go

-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ func UpdateIcon(db gorp.SqlExecutor, workflowID int64, icon string) error {
124124
if _, err := db.Exec("update workflow set icon = $1 where id = $2", icon, workflowID); err != nil {
125125
return sdk.WrapError(err, "cannot update workflow icon for workflow id %d", workflowID)
126126
}
127-
128127
return nil
129128
}
130129

0 commit comments

Comments
 (0)