From c76daae5fef9a7ba2523b1debed12601cdb9b63a Mon Sep 17 00:00:00 2001 From: liuzx Date: Wed, 16 Nov 2022 16:17:37 +0800 Subject: [PATCH] fix-3108 --- routers/api/v1/repo/cloudbrain.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/routers/api/v1/repo/cloudbrain.go b/routers/api/v1/repo/cloudbrain.go index 45e9ca2cb..066453e72 100755 --- a/routers/api/v1/repo/cloudbrain.go +++ b/routers/api/v1/repo/cloudbrain.go @@ -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