mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-29 05:11:04 +00:00
Fix cron migration (#4020)
This commit is contained in:
parent
eeec084293
commit
67a9c7991c
1 changed files with 3 additions and 2 deletions
|
@ -42,8 +42,9 @@ var cronWithoutSec = xormigrate.Migration{
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
c.Schedule = strings.SplitN(strings.TrimSpace(c.Schedule), " ", 2)[1]
|
if _, err := sess.Update(&model.Cron{
|
||||||
if _, err := sess.Update(c); err != nil {
|
Schedule: strings.SplitN(strings.TrimSpace(c.Schedule), " ", 2)[1],
|
||||||
|
}, c); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue