fix convert bugs
Former-commit-id: 8e1dae6f6d88c44b821e75557f3cba48074449d3
This commit is contained in:
parent
52aa14c613
commit
a779216f68
|
@ -479,8 +479,8 @@ func (o *OctopusLink) GetTrainingTask(ctx context.Context, taskId string) (*coll
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
jobresp := (resp).(*octopus.GetTrainJobResp)
|
jobresp, ok := (resp).(*octopus.GetTrainJobResp)
|
||||||
if !jobresp.Success {
|
if !jobresp.Success || !ok {
|
||||||
return nil, errors.New("get training task failed")
|
return nil, errors.New("get training task failed")
|
||||||
}
|
}
|
||||||
var task collector.Task
|
var task collector.Task
|
||||||
|
|
Loading…
Reference in New Issue