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

[fix] gettext requires request.preferences

This commit is contained in:
Adam Tauber 2016-11-15 09:56:18 +01:00
parent 028e5b43d4
commit 827f9e41ca

View File

@ -369,11 +369,11 @@ def pre_request():
request.errors = []
preferences = Preferences(themes, categories.keys(), engines, plugins)
request.preferences = preferences
try:
preferences.parse_cookies(request.cookies)
except:
request.errors.append(gettext('Invalid settings, please edit your preferences'))
request.preferences = preferences
# merge GET, POST vars
# request.form