fix: JSON_CONTAINS node_group_ids 参数需用引号包裹
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 8m25s
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 8m25s
JSON_CONTAINS 第二参数必须是 JSON 字符串,裸数字会报 Error 3146。 修复:%d → '%d' Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
parent
89e0c03fec
commit
2bdda7558c
@ -103,7 +103,7 @@ func (m *customServerModel) FilterNodeList(ctx context.Context, params *FilterNo
|
||||
// Multiple group IDs: node must belong to at least one of the groups
|
||||
var conditions []string
|
||||
for _, gid := range params.NodeGroupIds {
|
||||
conditions = append(conditions, fmt.Sprintf("JSON_CONTAINS(node_group_ids, %d)", gid))
|
||||
conditions = append(conditions, fmt.Sprintf("JSON_CONTAINS(node_group_ids, '%d')", gid))
|
||||
}
|
||||
if len(conditions) > 0 {
|
||||
query = query.Where("(" + strings.Join(conditions, " OR ") + ")")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user