fix convert bugs

Former-commit-id: 8e1dae6f6d88c44b821e75557f3cba48074449d3
This commit is contained in:
tzwang 2024-05-11 18:04:19 +08:00
parent 52aa14c613
commit a779216f68
1 changed files with 2 additions and 2 deletions

View File

@ -479,8 +479,8 @@ func (o *OctopusLink) GetTrainingTask(ctx context.Context, taskId string) (*coll
if err != nil {
return nil, err
}
jobresp := (resp).(*octopus.GetTrainJobResp)
if !jobresp.Success {
jobresp, ok := (resp).(*octopus.GetTrainJobResp)
if !jobresp.Success || !ok {
return nil, errors.New("get training task failed")
}
var task collector.Task