diff --git a/routers/api/v1/repo/cloudbrain.go b/routers/api/v1/repo/cloudbrain.go index cd15dae98..c2c06dcff 100755 --- a/routers/api/v1/repo/cloudbrain.go +++ b/routers/api/v1/repo/cloudbrain.go @@ -764,7 +764,7 @@ func CloudbrainGetLog(ctx *context.APIContext) { if (job.JobType == string(models.JobTypeTrain) || job.JobType == string(models.JobTypeInference)) && job.Type == models.TypeCloudBrainOne && job.Status == string(models.JobFailed) { if ctx.Data["existStr"] != nil { content = content + ctx.Data["existStr"].(string) - if baseLine == "" && order == "desc" { + if baseLine == "" && order == "desc" && result["Lines"].(int) == 0 { result["Lines"] = 1 result["EndLine"] = 1 }