mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
region: fix get disk detail panic
This commit is contained in:
@@ -919,7 +919,7 @@ func (self *SDisk) validateDeleteCondition(ctx context.Context, isPurge bool) er
|
||||
return httperrors.NewForbiddenError("not allow to delete prepaid disk in valid status")
|
||||
}
|
||||
storage := self.GetStorage()
|
||||
if storage.StorageType == api.STORAGE_RBD {
|
||||
if storage != nil && storage.StorageType == api.STORAGE_RBD {
|
||||
scnt, err := self.GetSnapshotCount()
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user