Skip to content

get_collection always returns last collection with a local catalog #780

@normanb

Description

@normanb

I am opening a local static STAC catalog as follows

  client = Client.open(catalog)
  collection = client.get_collection(collection_name)

This always returns the last collection in the catalog.

I think this clause needs a break to get out of the iteration when the id matches the collection_id;

https://github.com/stac-utils/pystac-client/blob/main/pystac_client/client.py#L412

Metadata

Metadata

Assignees

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