Browse Source

error when no type

tags/v1.21.7
lewis 4 years ago
parent
commit
7682ad040e
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      routers/repo/dataset.go

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

@@ -49,6 +49,12 @@ func DatasetIndex(ctx *context.Context) {
ctx.NotFound("GetDatasetByRepo", err)
return
}

if ctx.Query("type") == "" {
log.Error("not found param type")
ctx.NotFound("type error", nil)
return
}
err = models.GetDatasetAttachments(ctx.QueryInt("type"), dataset)
if err != nil {
ctx.ServerError("GetDatasetAttachments", err)


Loading…
Cancel
Save