fix: resolve crash operator in some cases
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
package managed_job
|
||||
|
||||
import "errors"
|
||||
|
||||
func (job *ManagedJob) Stop() error {
|
||||
return job.client.StopJob(*job.def.Status.JobId)
|
||||
if job.def.Status.JobId != nil {
|
||||
return job.client.StopJob(*job.def.Status.JobId)
|
||||
} else {
|
||||
return errors.New("job Id not found")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user