Skip to content

Commit

Permalink
fix(api): nil pointer workflow push (#6321)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlt authored Oct 6, 2022
1 parent 9be4119 commit 5a8f1fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/api/workflow/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ func Push(ctx context.Context, db *gorp.DbMap, store cache.Store, proj *sdk.Proj
// If a old workflow as code exists, we want to check if the new workflow is also as code on the same repository
if oldWf != nil && oldWf.FromRepository != "" {
// If no repository info are given but force option is set, allow workflow override
if (opts == nil || opts.FromRepository == "") && !opts.Force {
if opts == nil || (opts.FromRepository == "" && !opts.Force) {
return nil, nil, nil, nil, sdk.WithStack(sdk.ErrWorkflowAlreadyAsCode)
}
// Force option will not allow to change the repository of an existing workflow
Expand Down

0 comments on commit 5a8f1fa

Please sign in to comment.