1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-24 08:02:18 +02:00

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