Browse Source

Merge branch 'inference-job' of https://git.openi.org.cn/OpenI/aiforge into inference-job

tags/v1.22.1.2
zhoupzh 4 years ago
parent
commit
84da90b316
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      routers/repo/ai_model_manage.go

+ 6
- 4
routers/repo/ai_model_manage.go View File

@@ -146,7 +146,8 @@ func SaveModel(ctx *context.Context) {

if !trainTaskCreate {
if !ctx.Repo.CanWrite(models.UnitTypeModelManage) {
ctx.ServerError("No right.", errors.New(ctx.Tr("repo.model_noright")))
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
//ctx.ServerError("No right.", errors.New(ctx.Tr("repo.model_noright")))
return
}
}
@@ -270,7 +271,7 @@ func DownloadMultiModelFile(ctx *context.Context) {
return
}
if !isOper(ctx, task.UserId) {
ctx.ServerError("no right.", errors.New(ctx.Tr("repo.model_noright")))
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
return
}

@@ -552,7 +553,7 @@ func isOper(ctx *context.Context, modelUserId int64) bool {
func ShowModelPageInfo(ctx *context.Context) {
log.Info("ShowModelInfo start.")
if !isQueryRight(ctx) {
ctx.ServerError("no right.", errors.New(ctx.Tr("repo.model_noright")))
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
return
}
page := ctx.QueryInt("page")
@@ -624,7 +625,8 @@ func ModifyModelInfo(ctx *context.Context) {
return
}
if !isOper(ctx, task.UserId) {
ctx.ServerError("no right.", errors.New(ctx.Tr("repo.model_noright")))
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
//ctx.ServerError("no right.", errors.New(ctx.Tr("repo.model_noright")))
return
}



Loading…
Cancel
Save