From 2522254fb2d44e36fe556765fb0b5c851583f05f Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Sat, 21 Jan 2017 20:13:18 +0100 Subject: [PATCH] [fix] search time range value check --- searx/search.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/searx/search.py b/searx/search.py index 0bb77447..0cb53c41 100644 --- a/searx/search.py +++ b/searx/search.py @@ -240,8 +240,7 @@ def get_search_query_from_webapp(preferences, form): query_time_range = form.get('time_range') # check time_range - if not(query_time_range is None)\ - and not (query_time_range in ['', 'day', 'week', 'month', 'year']): + if query_time_range not in [None, '', 'day', 'week', 'month', 'year']: raise SearxParameterException('time_range', query_time_range) # query_engines