Skip to content

Commit

Permalink
fix(api): workflow push from repository (#6330)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlt authored Oct 10, 2022
1 parent c941171 commit 43a1ba1
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 @@ -1301,7 +1301,7 @@ func Push(ctx context.Context, db *gorp.DbMap, store cache.Store, proj *sdk.Proj
return nil, nil, nil, nil, sdk.WithStack(sdk.ErrWorkflowAlreadyAsCode)
}
// Force option will not allow to change the repository of an existing workflow
if opts != nil && opts.FromRepository != oldWf.FromRepository {
if opts != nil && opts.FromRepository != "" && opts.FromRepository != oldWf.FromRepository {
return nil, nil, nil, nil, sdk.WithStack(sdk.ErrWorkflowAlreadyAsCode)
}
}
Expand Down

0 comments on commit 43a1ba1

Please sign in to comment.