mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: 解决数据升级失败的问题 (#3755)
This commit is contained in:
parent
2cf3b27402
commit
f91d7c6170
@ -285,7 +285,7 @@ var UpdateCronjobSpec = &gormigrate.Migration{
|
|||||||
if err := tx.Model(&model.Cronjob{}).
|
if err := tx.Model(&model.Cronjob{}).
|
||||||
Where("id = ?", job.ID).
|
Where("id = ?", job.ID).
|
||||||
Updates(map[string]interface{}{
|
Updates(map[string]interface{}{
|
||||||
"backup_accounts": fmt.Sprintf("%v,%v", mapAccount[uint(job.TargetDirID)], constant.Local),
|
"backup_accounts": fmt.Sprintf("%v,%v", mapAccount[uint(job.TargetDirID)].Type, constant.Local),
|
||||||
"default_download": constant.Local,
|
"default_download": constant.Local,
|
||||||
}).Error; err != nil {
|
}).Error; err != nil {
|
||||||
return err
|
return err
|
||||||
@ -294,8 +294,8 @@ var UpdateCronjobSpec = &gormigrate.Migration{
|
|||||||
if err := tx.Model(&model.Cronjob{}).
|
if err := tx.Model(&model.Cronjob{}).
|
||||||
Where("id = ?", job.ID).
|
Where("id = ?", job.ID).
|
||||||
Updates(map[string]interface{}{
|
Updates(map[string]interface{}{
|
||||||
"backup_accounts": mapAccount[uint(job.TargetDirID)],
|
"backup_accounts": mapAccount[uint(job.TargetDirID)].Type,
|
||||||
"default_download": mapAccount[uint(job.TargetDirID)],
|
"default_download": mapAccount[uint(job.TargetDirID)].Type,
|
||||||
}).Error; err != nil {
|
}).Error; err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user