mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-22 23:51:27 +01:00
update implements of FilterTargets()
This commit is contained in:
parent
e05ff0373b
commit
82b4781571
@ -68,13 +68,10 @@ 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, args).QueryRows(targets); err != nil {
|
||||
if _, err := o.Raw(sql, "%"+name+"%").QueryRows(&targets); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user