Commit 0f8e2489 by CaIon

修复可用模型显示已禁用模型

parent 580dfd94
......@@ -15,8 +15,8 @@ type Ability struct {
func GetGroupModels(group string) []string {
var abilities []Ability
//去重
DB.Where("`group` = ?", group).Distinct("model").Find(&abilities)
//去重 enabled = true
DB.Where("`group` = ? and enabled = ?", group, true).Find(&abilities)
models := make([]string, 0, len(abilities))
for _, ability := range abilities {
models = append(models, ability.Model)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment