Commit dbdfebcc by CaIon

fix pgsql

parent fb48d77f
...@@ -16,7 +16,11 @@ type Ability struct { ...@@ -16,7 +16,11 @@ type Ability struct {
func GetGroupModels(group string) []string { func GetGroupModels(group string) []string {
var models []string var models []string
// Find distinct models // Find distinct models
DB.Table("abilities").Where("`group` = ? and enabled = ?", group, true).Distinct("model").Pluck("model", &models) groupCol := "`group`"
if common.UsingPostgreSQL {
groupCol = `"group"`
}
DB.Table("abilities").Where(groupCol+" = ? and enabled = ?", group, true).Distinct("model").Pluck("model", &models)
return models return models
} }
......
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