mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-08-11 05:12:58 +02:00
Change listQuery to jobId array, adapt filter pipe
This commit is contained in:
@@ -263,11 +263,11 @@ func buildStringCondition(field string, cond *model.StringInput, query sq.Select
|
||||
return query.Where(field+" LIKE ?", fmt.Sprint("%", *cond.Contains, "%"))
|
||||
}
|
||||
if cond.In != nil {
|
||||
queryUsers := make([]string, len(cond.In))
|
||||
queryElements := make([]string, len(cond.In))
|
||||
for i, val := range cond.In {
|
||||
queryUsers[i] = val
|
||||
queryElements[i] = val
|
||||
}
|
||||
return query.Where(sq.Or{sq.Eq{"job.user": queryUsers}})
|
||||
return query.Where(sq.Or{sq.Eq{field: queryElements}})
|
||||
}
|
||||
return query
|
||||
}
|
||||
|
Reference in New Issue
Block a user