[fix] search time range value check

This commit is contained in:
Adam Tauber 2017-01-21 20:13:18 +01:00
parent fa26afafd8
commit 2522254fb2

View File

@ -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