1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-14 16:50:11 +01:00

[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') query_time_range = form.get('time_range')
# check time_range # check time_range
if not(query_time_range is None)\ if query_time_range not in [None, '', 'day', 'week', 'month', 'year']:
and not (query_time_range in ['', 'day', 'week', 'month', 'year']):
raise SearxParameterException('time_range', query_time_range) raise SearxParameterException('time_range', query_time_range)
# query_engines # query_engines