mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 10:45:45 +01: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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if target == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
// decrypt the password
|
// decrypt the password
|
||||||
if len(target.Password) > 0 {
|
if len(target.Password) > 0 {
|
||||||
key, err := config.SecretKey()
|
key, err := config.SecretKey()
|
||||||
|
Loading…
Reference in New Issue
Block a user