mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: server-list details report nil pointer panic
This commit is contained in:
@@ -520,6 +520,9 @@ func (self *SBaremetalGuestDriver) IsSupportGuestClone() bool {
|
||||
|
||||
func (self *SBaremetalGuestDriver) IsSupportCdrom(guest *models.SGuest) (bool, error) {
|
||||
host := guest.GetHost()
|
||||
if host == nil {
|
||||
return false, errors.Wrap(httperrors.ErrNotFound, "no host")
|
||||
}
|
||||
ipmiInfo, err := host.GetIpmiInfo()
|
||||
if err != nil {
|
||||
return false, errors.Wrap(err, "host.GetIpmiInfo")
|
||||
|
||||
Reference in New Issue
Block a user