mirror of
https://github.com/searxng/searxng.git
synced 2024-11-14 00:30:15 +01:00
[fix] search time range value check
This commit is contained in:
parent
fa26afafd8
commit
2522254fb2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user