瀏覽代碼

[fix] allow none as category in preferences - #1086

Adam Tauber 7 年之前
父節點
當前提交
128eb76604
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      searx/preferences.py

+ 1
- 1
searx/preferences.py 查看文件

@@ -246,7 +246,7 @@ class Preferences(object):
246 246
     def __init__(self, themes, categories, engines, plugins):
247 247
         super(Preferences, self).__init__()
248 248
 
249
-        self.key_value_settings = {'categories': MultipleChoiceSetting(['general'], choices=categories),
249
+        self.key_value_settings = {'categories': MultipleChoiceSetting(['general'], choices=categories + ['none']),
250 250
                                    'language': SearchLanguageSetting(settings['search']['language'],
251 251
                                                                      choices=LANGUAGE_CODES),
252 252
                                    'locale': EnumStringSetting(settings['ui']['default_locale'],