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

update stac_io from owner root #762

Merged
merged 4 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Added

- Enum MediaType entry for PDF documents ([#758](https://github.com/stac-utils/pystac/pull/758))
- Updated Link to obtain stac_io from owner root ([#762](https://github.com/stac-utils/pystac/pull/762))

### Removed

Expand Down
4 changes: 4 additions & 0 deletions pystac/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ def resolve_stac_object(self, root: Optional["Catalog_Type"] = None) -> "Link":
if self.owner is not None:
if isinstance(self.owner, pystac.Catalog):
stac_io = self.owner._stac_io
else:
owner_root = self.owner.get_root()
if owner_root is not None:
stac_io = owner_root._stac_io
KennSmithDS marked this conversation as resolved.
Show resolved Hide resolved
if stac_io is None:
stac_io = pystac.StacIO.default()

Expand Down