Fix cron migration (#4020)

This commit is contained in:
qwerty287 2024-08-10 21:32:21 +02:00 committed by GitHub
parent eeec084293
commit 67a9c7991c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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