Skip to content

Commit 2afb761

Browse files
authored
fix: validate contract (#2197)
Signed-off-by: Miguel Martinez <[email protected]>
1 parent e390a21 commit 2afb761

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controlplane/internal/service/attestation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ func (s *AttestationService) FindOrCreateWorkflow(ctx context.Context, req *cpAP
707707
return nil, handleUseCaseErr(err, s.log)
708708
}
709709
// Check if the contract name the user wants to use is the same as the one in the workflow
710-
} else if req.GetContractName() != wf.ContractName {
710+
} else if req.GetContractName() != "" && req.GetContractName() != wf.ContractName {
711711
return nil, errors.BadRequest("bad request", "you can't change to another contract during the attestation process, please update the workflow")
712712
}
713713

0 commit comments

Comments
 (0)