mirror of
https://github.com/project-zot/zot.git
synced 2026-06-18 13:37:57 +08:00
fix: keep Search.CVE.Enable nil while defaulting enabled behavior
Agent-Logs-Url: https://github.com/project-zot/zot/sessions/f522f11f-2ac1-4e1f-928f-0a3ab51e3adf Co-authored-by: rchincha <45800463+rchincha@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
6024ae47e1
commit
8054651abe
@@ -874,11 +874,7 @@ func applyDefaultValues(config *config.Config, viperInstance *viper.Viper, logge
|
||||
}
|
||||
|
||||
if *config.Extensions.Search.Enable && config.Extensions.Search.CVE != nil {
|
||||
if config.Extensions.Search.CVE.Enable == nil {
|
||||
config.Extensions.Search.CVE.Enable = &defaultVal
|
||||
}
|
||||
|
||||
if *config.Extensions.Search.CVE.Enable {
|
||||
if config.Extensions.Search.CVE.Enable == nil || *config.Extensions.Search.CVE.Enable {
|
||||
defaultUpdateInterval, _ := time.ParseDuration("2h")
|
||||
|
||||
if config.Extensions.Search.CVE.UpdateInterval < defaultUpdateInterval {
|
||||
|
||||
Reference in New Issue
Block a user