1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 20:17:45 +01:00

[fix] user data check

This commit is contained in:
Adam Tauber 2016-04-09 17:43:00 +02:00
parent 149b08a062
commit bb6dae1e42

View File

@ -235,9 +235,11 @@ class Preferences(object):
if user_setting_name in self.key_value_settings: if user_setting_name in self.key_value_settings:
self.key_value_settings[user_setting_name].parse(user_setting) self.key_value_settings[user_setting_name].parse(user_setting)
elif user_setting_name == 'disabled_engines': 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': 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): def parse_form(self, input_data):
disabled_engines = [] disabled_engines = []