Browse Source

提交代码

tags/v1.22.3.2^2
ychao_1983 3 years ago
parent
commit
ce1ff8e795
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      routers/repo/attachment.go

+ 6
- 0
routers/repo/attachment.go View File

@@ -68,6 +68,12 @@ func renderAttachmentSettings(ctx *context.Context) {

func UploadAttachmentUI(ctx *context.Context) {
ctx.Data["datasetId"] = ctx.Query("datasetId")
dataset, _ := models.GetDatasetByID(ctx.QueryInt64("datasetId"))
if dataset == nil {
ctx.Error(404, "The dataset does not exits.")
}
r, _ := models.GetRepositoryByID(dataset.RepoID)
ctx.Data["Repo"] = r
ctx.HTML(200, tplAttachmentUpload)

}


Loading…
Cancel
Save