Merge pull request #5884 from ioito/hotfix/qx-external-project-sync

fix: 仅当变更domainId时才需要更新projectId
This commit is contained in:
Zexi Li
2020-04-22 10:32:17 +08:00
committed by GitHub
+4 -2
View File
@@ -196,8 +196,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 {