diff --git a/routers/repo/dataset.go b/routers/repo/dataset.go index 9c8557afa..521ef907c 100755 --- a/routers/repo/dataset.go +++ b/routers/repo/dataset.go @@ -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)