fix(cli): allow empty schedule to clear it

test-patch-1
Jef Roosens 2022-05-01 14:51:52 +02:00
parent 0b050a81db
commit 5cde3d0235
Signed by untrusted user: Jef Roosens
GPG Key ID: B580B976584B5F30
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ fn remove(conf Config, id_prefix string) ? {
fn patch(conf Config, id_prefix string, params map[string]string) ? {
// We check the cron expression first because it's useless to send an
// invalid one to the server.
if 'schedule' in params {
if 'schedule' in params && params['schedule'] != '' {
parse_expression(params['schedule']) or {
return error('Invalid cron expression: $err.msg()')
}