Merge pull request #5055 from swordqiu/automated-cherry-pick-of-#5054-upstream-release-3.1

Automated cherry pick of #5054: fix: createdAt should not be synced when update
This commit is contained in:
yunion-ci-robot
2020-02-09 22:08:59 +08:00
committed by GitHub
+6 -5
View File
@@ -2312,11 +2312,12 @@ func (self *SGuest) syncWithCloudVM(ctx context.Context, userCred mcclient.Token
self.ExpiredAt = extVM.GetExpiredAt()
}
if !recycle {
if createdAt := extVM.GetCreatedAt(); !createdAt.IsZero() {
self.CreatedAt = createdAt
}
}
// no need to sync CreatedAt
// if !recycle {
// if createdAt := extVM.GetCreatedAt(); !createdAt.IsZero() {
// self.CreatedAt = createdAt
// }
// }
return nil
})