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 } }