Merge pull request #12059 from ioito/hotfix/qx-eip-project-sync

fix(region): eip project sync
This commit is contained in:
Zexi Li
2021-08-31 11:31:49 +08:00
committed by GitHub
+2 -1
View File
@@ -491,7 +491,8 @@ func (self *SElasticip) SyncWithCloudEip(ctx context.Context, userCred mcclient.
}
syncVirtualResourceMetadata(ctx, userCred, self, ext)
if res := self.GetAssociateResource(); res != nil {
// eip有绑定资源,并且绑定资源是项目资源,eip项目信息跟随绑定资源
if res := self.GetAssociateResource(); res != nil && len(res.GetOwnerId().GetProjectId()) > 0 {
self.SyncCloudProjectId(userCred, res.GetOwnerId())
} else {
SyncCloudProject(userCred, self, syncOwnerId, ext, self.ManagerId)