Browse Source

fix-3108

tags/v1.22.11.2^2
liuzx 2 years ago
parent
commit
c76daae5fe
1 changed files with 9 additions and 2 deletions
  1. +9
    -2
      routers/api/v1/repo/cloudbrain.go

+ 9
- 2
routers/api/v1/repo/cloudbrain.go View File

@@ -658,9 +658,16 @@ func CloudbrainGetLog(ctx *context.APIContext) {
if result["Content"] != nil {
content = result["Content"].(string)
}
if ctx.Data["existStr"] != nil && result["Lines"].(int) < 50 {
content = content + ctx.Data["existStr"].(string)
if job.JobType == string(models.JobTypeModelSafety) {
if ctx.Data["existStr"] != nil && result["Lines"].(int) < 50 {
content = content + ctx.Data["existStr"].(string)
}
} else {
if ctx.Data["existStr"] != nil {
content = content + ctx.Data["existStr"].(string)
}
}

logFileName := result["FileName"]

//Logs can only be downloaded if the file exists


Loading…
Cancel
Save