# HG changeset patch # User Sascha L. Teichmann # Date 1547047737 -3600 # Node ID abcf21649bd1cfb4afc56978804161711dcff0e7 # Parent c88e758cb96c72a64740a571721ec6bb67b39d16 Configured imports: Always take cron spec from input document when modifying a configuration. diff -r c88e758cb96c -r abcf21649bd1 pkg/controllers/importconfig.go --- a/pkg/controllers/importconfig.go Wed Jan 09 15:55:59 2019 +0100 +++ b/pkg/controllers/importconfig.go Wed Jan 09 16:28:57 2019 +0100 @@ -131,7 +131,7 @@ var ( entry imports.IDConfig kind string - cron sql.NullString + dummy sql.NullString url sql.NullString ) @@ -141,7 +141,7 @@ &kind, &entry.SendEMail, &entry.AutoAccept, - &cron, + &dummy, &url, ) @@ -161,6 +161,9 @@ entry.SendEMail = importConfig.SendEMail entry.AutoAccept = importConfig.AutoAccept + // We always take the cron spec from the input. + // If there is no spec remove schedule. + var cron sql.NullString if importConfig.Cron != nil { cron = sql.NullString{String: string(*importConfig.Cron), Valid: true} }