Skip to content

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

Closed
@mmcfarland

Description

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.

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions