Skip to content

Commit

Permalink
fix(api): loading pipeline workflow holder (#5176)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlt authored May 14, 2020
1 parent 2d84513 commit 6f14f3b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 11 additions & 2 deletions engine/api/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ func (api *API) updateAsCodePipelineHandler() service.Handler {
return sdk.WrapError(sdk.ErrInvalidPipelinePattern, "updateAsCodePipelineHandler: Pipeline name %s do not respect pattern", p.Name)
}

proj, err := project.Load(api.mustDB(), key, project.LoadOptions.WithClearKeys)
proj, err := project.Load(api.mustDB(), key,
project.LoadOptions.WithApplicationWithDeploymentStrategies,
project.LoadOptions.WithPipelines,
project.LoadOptions.WithEnvironments,
project.LoadOptions.WithIntegrations,
project.LoadOptions.WithClearKeys)
if err != nil {
return err
}
Expand Down Expand Up @@ -295,7 +300,11 @@ func (api *API) getPipelineHandler() service.Handler {
withWorkflows := FormBool(r, "withWorkflows")
withAsCodeEvent := FormBool(r, "withAsCodeEvents")

proj, err := project.Load(api.mustDB(), projectKey)
proj, err := project.Load(api.mustDB(), projectKey,
project.LoadOptions.WithApplicationWithDeploymentStrategies,
project.LoadOptions.WithPipelines,
project.LoadOptions.WithEnvironments,
project.LoadOptions.WithIntegrations)
if err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion engine/api/workflow/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ func UpdateIcon(db gorp.SqlExecutor, workflowID int64, icon string) error {
if _, err := db.Exec("update workflow set icon = $1 where id = $2", icon, workflowID); err != nil {
return sdk.WrapError(err, "cannot update workflow icon for workflow id %d", workflowID)
}

return nil
}

Expand Down

0 comments on commit 6f14f3b

Please sign in to comment.