Skip to content

Commit

Permalink
Merge pull request #7905 from EricSoroos/7736-to_take_search_param_ma…
Browse files Browse the repository at this point in the history
…ster

Fix queries when state is in fq_list
  • Loading branch information
amercader committed Nov 24, 2023
2 parents 5eea0c3 + 6039ddd commit dcdb7e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes/7905.bugfix
@@ -0,0 +1 @@
Changed dataset query to check for `+state:` in the `fq_list` as well as the `fq` parameter before forcing `state:active`
2 changes: 1 addition & 1 deletion ckan/lib/search/query.py
Expand Up @@ -365,7 +365,7 @@ def run(self,
fq.append('+site_id:%s' % solr_literal(config.get('ckan.site_id')))

# filter for package status
if not '+state:' in query.get('fq', ''):
if not any('+state:' in _item for _item in fq):
fq.append('+state:active')

# only return things we should be able to see
Expand Down

0 comments on commit dcdb7e7

Please sign in to comment.