Use get with default

This commit is contained in:
Mikael Karlsson 2016-10-06 17:06:56 +03:00
parent f303eca66f
commit 9a7cbc854e
1 changed files with 1 additions and 1 deletions

View File

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