mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #5886 from ioito/automated-cherry-pick-of-#5884-upstream-release-3.1
Automated cherry pick of #5884: fix: 仅当变更domainId时才需要更新projectId
This commit is contained in:
@@ -182,8 +182,10 @@ func (self *SExternalProject) SyncWithCloudProject(ctx context.Context, userCred
|
||||
diff, err := db.UpdateWithLock(ctx, self, func() error {
|
||||
self.Name = ext.GetName()
|
||||
self.IsEmulated = ext.IsEmulated()
|
||||
self.ProjectId = provider.ProjectId
|
||||
self.DomainId = provider.DomainId
|
||||
if self.DomainId != provider.DomainId {
|
||||
self.ProjectId = provider.ProjectId
|
||||
self.DomainId = provider.DomainId
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user