Skip to content

Aggregate Extension Filter Attribute Missing #357

Closed
@tjellicoe-tpzuk

Description

@tjellicoe-tpzuk

Describe the bug
The aggregate extension is looking for aggregate_request.filter attribute in multiple locations, however this no longer exists in the stac-fastapi package. Instead, the package uses an alias when setting this attribute, but it is then only accessible using the filter_expr attribute instead.

To Reproduce
Attempt to visit the /aggregate?aggregations=total_count endpoint as an example, and seeing the following response:
{"code":"AttributeError","description":"'EsAggregationExtensionPostRequest' object has no attribute 'filter'"}

Expected behavior
It should be able to read the filter definition directly from the class. However, it will need to use the actual attribute name, filter_expr, rather than the alias, filter.

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser: Firefox

Additional context
Expect we just need to update any references to aggregate_request.filter to be updated to aggregate_request.filter_expr in the aggregate extension.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions