Skip to content

Commit

Permalink
fixes issue were stage owner was never getting inserted (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
eoinmcafee00 authored Aug 11, 2022
1 parent 6db9803 commit 122b9ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions command/harness/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ func HandleSetup(ctx context.Context, r *SetupVMRequest, s store.StageOwnerStore
if !poolManager.Exists(pool) {
return nil, fmt.Errorf("pool not defined")
}
exists, _ := s.Find(ctx, stageRuntimeID, pool)
if exists == nil {
_, findErr := s.Find(ctx, stageRuntimeID, pool)
if findErr != nil {
if err := s.Create(ctx, &types.StageOwner{StageID: stageRuntimeID, PoolName: pool}); err != nil {
return nil, fmt.Errorf("could not create stage owner entity: %w", err)
}
Expand Down

0 comments on commit 122b9ec

Please sign in to comment.