Browse Source

Merge pull request 'fix 1542' (#1544) from opt-notebook into V20220228

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1544
Reviewed-by: ychao_1983 <ychao_1983@sina.com>
opt-notebook
ychao_1983 3 years ago
parent
commit
ac5d8716f4
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      routers/repo/modelarts.go

+ 7
- 5
routers/repo/modelarts.go View File

@@ -257,13 +257,15 @@ func NotebookShow(ctx *context.Context) {
} }


var datasetDownloadLink string var datasetDownloadLink string
if task.Uuid != "" && task.UserID == ctx.User.ID {
attachment, err := models.GetAttachmentByUUID(task.Uuid)
if err == nil {
datasetDownloadLink = attachment.S3DownloadURL()
if ctx.IsSigned {
if task.Uuid != "" && task.UserID == ctx.User.ID {
attachment, err := models.GetAttachmentByUUID(task.Uuid)
if err == nil {
datasetDownloadLink = attachment.S3DownloadURL()
}
} }
} }
ctx.Data["datasetDownloadLink"] = datasetDownloadLink ctx.Data["datasetDownloadLink"] = datasetDownloadLink
ctx.Data["task"] = task ctx.Data["task"] = task
ctx.Data["jobID"] = jobID ctx.Data["jobID"] = jobID


Loading…
Cancel
Save