Merge pull request #2349 from dalf/fix-settings-loader

[fix] settings_loader: don't crash when a key exists only in the user settings
This commit is contained in:
Alexandre Flament 2020-12-03 11:47:53 +01:00 committed by GitHub
commit 7905d41487
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -57,7 +57,10 @@ def update_settings(default_settings, user_settings):
# merge everything except the engines # merge everything except the engines
for k, v in user_settings.items(): for k, v in user_settings.items():
if k not in ('use_default_settings', 'engines'): if k not in ('use_default_settings', 'engines'):
update_dict(default_settings[k], v) if k in default_settings:
update_dict(default_settings[k], v)
else:
default_settings[k] = v
# parse the engines # parse the engines
remove_engines = None remove_engines = None

View file

@ -4,3 +4,6 @@ server:
bind_address: "0.0.0.0" bind_address: "0.0.0.0"
default_http_headers: default_http_headers:
Custom-Header: Custom-Value Custom-Header: Custom-Value
result_proxy:
url : https://localhost/morty
key : "$ecretKey"