|
|
|
@@ -391,6 +391,11 @@ func ShowOneVersionOtherModel(ctx *context.Context) { |
|
|
|
repoId := ctx.Repo.Repository.ID |
|
|
|
name := ctx.Query("name") |
|
|
|
aimodels := models.QueryModelByName(name, repoId) |
|
|
|
for _, model := range aimodels { |
|
|
|
log.Info("model=" + model.Name) |
|
|
|
log.Info("model.UserId=" + fmt.Sprint(model.UserId)) |
|
|
|
model.IsCanOper = isOper(ctx, model.UserId) |
|
|
|
} |
|
|
|
if len(aimodels) > 0 { |
|
|
|
ctx.JSON(200, aimodels[1:]) |
|
|
|
} else { |
|
|
|
|