Skip to content

Commit 8974c38 doesn't provide backward compatibilityΒ #428

@MathewNWSH

Description

@MathewNWSH

Describe the bug
Commit 8974c38 which introduced assets attributes indexing, doesn't provide backward compatibility.

To Reproduce
After running newer sfeos app on older os db:

  File "/tmp/stac-fastapi-elasticsearch-opensearch/stac_fastapi/core/stac_fastapi/core/serializers.py", line 185, in db_to_stac
    a.pop("es_key"): a for a in collection.get("assets", [])
    ^^^^^
AttributeError: 'str' object has no attribute 'pop'

Expected behavior
Provided updates should work with existing instances, also indexing of assets attributes could be optional.

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