Merge pull request #5226 from yousong/bugfix/yousong-lbbackend-details

lbbackend: fix nil ref when getting details
This commit is contained in:
yunion-ci-robot
2020-02-24 14:33:08 +08:00
committed by GitHub
+2 -1
View File
@@ -310,8 +310,9 @@ func (lbb *SLoadbalancerBackend) GetExtraDetails(ctx context.Context, userCred m
if err != nil {
log.Warningf("loadbalancer backend %s(%s): get vpc: %v", lbb.Name, lbb.Id, err)
return out, err
} else if vpc != nil {
out.VpcId = vpc.Id
}
out.VpcId = vpc.Id
return out, nil
}