From 9efaaf0620ebe5adcb3148820e6439edd9343081 Mon Sep 17 00:00:00 2001 From: ioito Date: Mon, 2 Sep 2019 16:30:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BF=BD=E7=95=A5=E8=A3=B8=E9=87=91?= =?UTF-8?q?=E5=B1=9E=E5=99=A8=E5=88=A0=E9=99=A4=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/compute/models/guests.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/compute/models/guests.go b/pkg/compute/models/guests.go index 8b1be56fda..80547ec9a6 100644 --- a/pkg/compute/models/guests.go +++ b/pkg/compute/models/guests.go @@ -528,7 +528,7 @@ func (guest *SGuest) ValidatePurgeCondition(ctx context.Context) error { func (guest *SGuest) ValidateDeleteCondition(ctx context.Context) error { host := guest.GetHost() - if host != nil { + if host != nil && guest.GetHypervisor() != api.HYPERVISOR_BAREMETAL { if !host.Enabled { return httperrors.NewInputParameterError("Cannot delete server on disabled host") }