ckan / ckan/ckanext-spatial

Setting ckan.search.solr_allowed_query_parsers in ini results in error

Open
#345 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
XSLT
Stars
136
Forks
207
PR merge metrics
No merged PRs in 30d

Description

https://github.com/ckan/ckanext-spatial/blob/master/ckanext/spatial/plugin/__init__.py#L165 assumes that `config["ckan.search.solr_allowed_query_parsers"]` contains a list, but if it is set in ini file (and not by the above default value) it contains a string, causing an error. Also if the string already contains the value in `qp`, adding a duplicate is unnecessary.

Contributor guide

No contributing guide indexed for this repository

Research direction

Open ckanext/spatial/plugin/__init__.py around line 165 and inspect how ckan.search.solr_allowed_query_parsers is read and updated. Verify the behavior with the setting supplied through an ini file, and consider the existing default path; done means an ini-provided value no longer errors and an already-present parser is not duplicated.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.