From f87e624270274feeb41a3ab60c29f59bde167b27 Mon Sep 17 00:00:00 2001 From: ioito Date: Tue, 12 Apr 2022 14:55:38 +0800 Subject: [PATCH] fix(region): avoid panic --- pkg/compute/models/hosts.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/compute/models/hosts.go b/pkg/compute/models/hosts.go index 4d772637eb..535bd37d39 100644 --- a/pkg/compute/models/hosts.go +++ b/pkg/compute/models/hosts.go @@ -4918,6 +4918,7 @@ func (host *SHost) SyncEsxiHostWires(ctx context.Context, userCred mcclient.Toke HostId: host.GetId(), WireId: vsWire.WireId, } + hostwire.SetModelManager(HostwireManager, hostwire) hostwire.MacAddr = vsWire.Mac err := HostwireManager.TableSpec().Insert(ctx, hostwire) if err != nil {