summaryrefslogtreecommitdiff
path: root/searx/preferences.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-04-09 17:43:00 +0200
committerAdam Tauber <asciimoo@gmail.com>2016-04-09 17:43:00 +0200
commitbb6dae1e4223e7ae6eda5f67da9f6e11639a7691 (patch)
tree82b15ec6cef73cbc50b58431217522db6c123aff /searx/preferences.py
parent149b08a062fd002c3cb52bfe423ead23495ae8df (diff)
downloadsearxng-bb6dae1e4223e7ae6eda5f67da9f6e11639a7691.tar.gz
searxng-bb6dae1e4223e7ae6eda5f67da9f6e11639a7691.zip
[fix] user data check
Diffstat (limited to 'searx/preferences.py')
-rw-r--r--searx/preferences.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/searx/preferences.py b/searx/preferences.py
index 4cb83ef0c..ad9e67335 100644
--- a/searx/preferences.py
+++ b/searx/preferences.py
@@ -235,9 +235,11 @@ class Preferences(object):
if user_setting_name in self.key_value_settings:
self.key_value_settings[user_setting_name].parse(user_setting)
elif user_setting_name == 'disabled_engines':
- self.engines.parse_cookie([input_data['disabled_engines'], input_data['enabled_engines']])
+ self.engines.parse_cookie((input_data.get('disabled_engines', ''),
+ input_data.get('enabled_engines', '')))
elif user_setting_name == 'disabled_plugins':
- self.plugins.parse_cookie([input_data['disabled_plugins'], input_data['enabled_plugins']])
+ self.plugins.parse_cookie((input_data.get('disabled_plugins', ''),
+ input_data.get('enabled_plugins', '')))
def parse_form(self, input_data):
disabled_engines = []