mirror of
https://github.com/searxng/searxng
synced 2024-11-18 15:26:25 +00:00
[fix] categories can't be removed from UI (categories_as_tabs)
When using ``use_default_settings: true``, removing default categories from
settings.yml will not remove them from the UI.
The value ``categories_as_tabs`` is a dictionary type (a4c2cfb
) and dictionary
types are merged additive by ``settings_loader.update_settings()``.
This patch replaces the default ``categories_as_tabs`` by the one from the
``user_settings``.
Related: https://github.com/searxng/searxng/issues/1019#issuecomment-1193145654
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
464e69665c
commit
0c4003ab2d
@ -74,6 +74,10 @@ def update_settings(default_settings, user_settings):
|
||||
else:
|
||||
default_settings[k] = v
|
||||
|
||||
categories_as_tabs = user_settings.get('categories_as_tabs')
|
||||
if categories_as_tabs:
|
||||
default_settings['categories_as_tabs'] = categories_as_tabs
|
||||
|
||||
# parse the engines
|
||||
remove_engines = None
|
||||
keep_only_engines = None
|
||||
|
Loading…
Reference in New Issue
Block a user