mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): avoid panic (#24988)
This commit is contained in:
@@ -2333,6 +2333,9 @@ func (account *SCloudaccount) probeAccountStatus(ctx context.Context, userCred m
|
||||
}
|
||||
balance, err := manager.GetBalance()
|
||||
if err != nil {
|
||||
if gotypes.IsNil(balance) {
|
||||
balance = &cloudprovider.SBalanceInfo{}
|
||||
}
|
||||
switch err {
|
||||
case cloudprovider.ErrNotSupported:
|
||||
balance.Status = api.CLOUD_PROVIDER_HEALTH_NORMAL
|
||||
|
||||
Reference in New Issue
Block a user