fix: set appropriate defaults when new keys added (#8795)

A new key was added in identity_openid recently
required explicitly for client to set the optional
value without that it would be empty, handle this
appropriately.

Fixes #8787
This commit is contained in:
Harshavardhana
2020-01-10 16:57:18 -08:00
committed by GitHub
parent 5aa5dcdc6d
commit 686d4656de
3 changed files with 12 additions and 3 deletions

View File

@@ -121,9 +121,7 @@ func LookupConfig(kvs config.KVS) (Config, error) {
return cfg, config.ErrInvalidCacheQuota(err)
}
cfg.Quota = cfg.MaxUse
}
if quotaStr := env.Get(EnvCacheQuota, kvs.Get(Quota)); quotaStr != "" {
} else if quotaStr := env.Get(EnvCacheQuota, kvs.Get(Quota)); quotaStr != "" {
cfg.Quota, err = strconv.Atoi(quotaStr)
if err != nil {
return cfg, config.ErrInvalidCacheQuota(err)