mirror of
https://github.com/searxng/searxng.git
synced 2024-11-05 17:09:31 +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
1 changed files with 4 additions and 0 deletions
|
@ -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 a new issue