mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
Merge pull request #7841 from ioito/hotfix/qx-public-zone-create
fix: avoid create public zone failed
This commit is contained in:
@@ -346,7 +346,7 @@ func (self *SDnsZoneCache) SyncVpcForCloud(ctx context.Context, userCred mcclien
|
||||
func (self *SDnsZoneCache) GetCloudaccount() (*SCloudaccount, error) {
|
||||
account, err := CloudaccountManager.FetchById(self.CloudaccountId)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "loudaccountManager.FetchById(%s)", self.CloudaccountId)
|
||||
return nil, errors.Wrapf(err, "CloudaccountManager.FetchById(%s)", self.CloudaccountId)
|
||||
}
|
||||
return account.(*SCloudaccount), nil
|
||||
}
|
||||
|
||||
@@ -156,7 +156,9 @@ func (self *SDnsZone) PostCreate(ctx context.Context, userCred mcclient.TokenCre
|
||||
self.RegisterCache(ctx, userCred, account.Id)
|
||||
}
|
||||
case cloudprovider.PublicZone:
|
||||
self.RegisterCache(ctx, userCred, input.CloudaccountId)
|
||||
if len(input.CloudaccountId) > 0 {
|
||||
self.RegisterCache(ctx, userCred, input.CloudaccountId)
|
||||
}
|
||||
}
|
||||
self.StartDnsZoneCreateTask(ctx, userCred, "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user