From 94b2b0c7a73ce29d4dd6208f01d0424c08c8299d Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 31 Aug 2022 10:15:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/modelarts.go | 9 +++++---- templates/repo/modelmanage/showinfo.tmpl | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 32ef43a02..ee957db66 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -341,6 +341,7 @@ func GetCloudBrainDataSetInfo(uuid string, datasetname string, isNeedDown bool) for i, uuidStr := range uuidList { name := "" link := "" + url := "" isDelete := false attachment, err := models.GetAttachmentByUUID(uuidStr) if err != nil { @@ -360,11 +361,11 @@ func GetCloudBrainDataSetInfo(uuid string, datasetname string, isNeedDown bool) link = repo.Link() + "/datasets" } } + if isNeedDown { + url = attachment.S3DownloadURL() + } } - url := "" - if isNeedDown { - url = attachment.S3DownloadURL() - } + datasetDownload = append(datasetDownload, models.DatasetDownload{ DatasetName: name, DatasetDownloadLink: url, diff --git a/templates/repo/modelmanage/showinfo.tmpl b/templates/repo/modelmanage/showinfo.tmpl index 4acf394f2..e18c6bd99 100644 --- a/templates/repo/modelmanage/showinfo.tmpl +++ b/templates/repo/modelmanage/showinfo.tmpl @@ -125,7 +125,7 @@ - {{$.i18n.Tr "repo.model.manage.createtrainjob"}} + {{$.i18n.Tr "repo.modelarts.train_job"}}