mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
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:
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user