Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't override default-filter-lang if it is set to cql-json #77

Closed
mmcfarland opened this issue Dec 22, 2021 · 0 comments · Fixed by #78
Closed

Can't override default-filter-lang if it is set to cql-json #77

mmcfarland opened this issue Dec 22, 2021 · 0 comments · Fixed by #78
Assignees
Labels
bug Something isn't working

Comments

@mmcfarland
Copy link
Collaborator

If the pgstac_settings default-filter-lang is set to cql-json, I don't believe it can be overridden as intended by this line:

IF (search ? 'filter-lang' AND search->>'filter-lang' = 'cql-json') OR get_setting('default-filter-lang', _search->'conf')='cql-json' THEN

In the case where the default is set to "cql-json" and the client sends a filter-lang property of "cql2-json", I read the logic of that lines as (false or true) and it then attempts and fails to parse the cql2 as cql (which is the behavior I'm seeing). Instead, I think the default just need to be checked is the search didn't provide a filter-lang property.

If the default is set to cql2-json, the search-supplied and override behavior seems correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants