mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
fix(region): sync prepaid disk expired time (#23235)
This commit is contained in:
@@ -259,8 +259,15 @@ func (self *ManagedGuestCreateDiskTask) OnManagedDiskPrepared(ctx context.Contex
|
||||
continue
|
||||
}
|
||||
|
||||
idisk.Refresh()
|
||||
|
||||
db.Update(disk, func() error {
|
||||
disk.BillingType = guest.BillingType
|
||||
disk.AutoRenew = guest.AutoRenew
|
||||
disk.ExpiredAt = guest.ExpiredAt
|
||||
if expiredAt := idisk.GetExpiredAt(); !expiredAt.IsZero() {
|
||||
disk.ExpiredAt = expiredAt
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user