mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 10:45:45 +01:00
update implements of FilterTargets()
This commit is contained in:
parent
e5fe595f62
commit
e05ff0373b
@ -68,10 +68,13 @@ func FilterRepTargets(name string) ([]*models.RepTarget, error) {
|
||||
}
|
||||
|
||||
o := GetOrmer()
|
||||
var args []string
|
||||
args = append(args, "%"+name+"%")
|
||||
|
||||
var targets []*models.RepTarget
|
||||
|
||||
sql := "select * from replication_target where name like ?"
|
||||
if _, err := o.Raw(sql, "%"+name+"%").QueryRows(targets); err != nil {
|
||||
if _, err := o.Raw(sql, args).QueryRows(targets); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user