From 67a9c7991cfeadef19a5d4e00ad72191b3367ac2 Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Sat, 10 Aug 2024 21:32:21 +0200 Subject: [PATCH] Fix cron migration (#4020) --- server/store/datastore/migration/033_cron_without_sec.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/store/datastore/migration/033_cron_without_sec.go b/server/store/datastore/migration/033_cron_without_sec.go index a170401b3..12e5b257f 100644 --- a/server/store/datastore/migration/033_cron_without_sec.go +++ b/server/store/datastore/migration/033_cron_without_sec.go @@ -42,8 +42,9 @@ var cronWithoutSec = xormigrate.Migration{ continue } - c.Schedule = strings.SplitN(strings.TrimSpace(c.Schedule), " ", 2)[1] - if _, err := sess.Update(c); err != nil { + if _, err := sess.Update(&model.Cron{ + Schedule: strings.SplitN(strings.TrimSpace(c.Schedule), " ", 2)[1], + }, c); err != nil { return err } }