From f91d7c6170109d92200b99a45ae3084f6001282a Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Tue, 30 Jan 2024 23:25:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#3755)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/init/migration/migrations/v_1_9.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/init/migration/migrations/v_1_9.go b/backend/init/migration/migrations/v_1_9.go index 65e46ecdd..c5f4f0547 100644 --- a/backend/init/migration/migrations/v_1_9.go +++ b/backend/init/migration/migrations/v_1_9.go @@ -285,7 +285,7 @@ var UpdateCronjobSpec = &gormigrate.Migration{ if err := tx.Model(&model.Cronjob{}). Where("id = ?", job.ID). 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, }).Error; err != nil { return err @@ -294,8 +294,8 @@ var UpdateCronjobSpec = &gormigrate.Migration{ if err := tx.Model(&model.Cronjob{}). Where("id = ?", job.ID). Updates(map[string]interface{}{ - "backup_accounts": mapAccount[uint(job.TargetDirID)], - "default_download": mapAccount[uint(job.TargetDirID)], + "backup_accounts": mapAccount[uint(job.TargetDirID)].Type, + "default_download": mapAccount[uint(job.TargetDirID)].Type, }).Error; err != nil { return err }