Use get with default
This commit is contained in:
parent
f303eca66f
commit
9a7cbc854e
|
@ -33,7 +33,7 @@ class DateSearchPlugin(plugins.SingletonPlugin):
|
|||
end_date = '*'
|
||||
|
||||
# Add a date-range query with the selected start and/or end dates into the Solr facet queries.
|
||||
fq = search_params['fq']
|
||||
fq = search_params.get('fq', '')
|
||||
fq = '{fq} +extras_PublicationTimestamp:[{sd} TO {ed}]'.format(fq=fq, sd=start_date, ed=end_date)
|
||||
|
||||
search_params['fq'] = fq
|
||||
|
|
Loading…
Reference in New Issue