diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index aadaf4411..93045129e 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -393,8 +393,6 @@ func ShowSingleModel(ctx *context.Context) { userIds := make([]int64, len(models)) for i, model := range models { - log.Info("model=" + model.Name) - log.Info("model.UserId=" + fmt.Sprint(model.UserId)) model.IsCanOper = isOper(ctx, model.UserId) userIds[i] = model.UserId } @@ -419,13 +417,11 @@ func queryUserName(intSlice []int64) map[int64]*models.User { uniqueElements = append(uniqueElements, entry) } } - uniqueElementsJson, _ := json.Marshal(uniqueElements) - log.Info("uniqueElementsJson=" + string(uniqueElementsJson)) result := make(map[int64]*models.User) userLists, err := models.GetUsersByIDs(uniqueElements) if err == nil { - for i, user := range userLists { - result[uniqueElements[i]] = user + for _, user := range userLists { + result[user.ID] = user } } @@ -439,8 +435,6 @@ func ShowOneVersionOtherModel(ctx *context.Context) { userIds := make([]int64, len(aimodels)) for i, model := range aimodels { - log.Info("model=" + model.Name) - log.Info("model.UserId=" + fmt.Sprint(model.UserId)) model.IsCanOper = isOper(ctx, model.UserId) userIds[i] = model.UserId } @@ -527,9 +521,6 @@ func ShowModelPageInfo(ctx *context.Context) { userNameMap := queryUserName(userIds) - userNameMapJson, _ := json.Marshal(userNameMap) - log.Info("userNameMapJson=" + string(userNameMapJson)) - for _, model := range modelResult { value := userNameMap[model.UserId] if value != nil {