mirror of
https://github.com/goharbor/harbor
synced 2025-04-08 20:00:56 +00:00
Fix nil pointer issue in replication/target
This commit is contained in:
parent
0dd595ca63
commit
35fe857b07
|
@ -40,6 +40,11 @@ func (d *DefaultManager) GetTarget(id int64) (*models.RepTarget, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if target == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// decrypt the password
|
||||
if len(target.Password) > 0 {
|
||||
key, err := config.SecretKey()
|
||||
|
|
Loading…
Reference in New Issue
Block a user