Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/mypy-0.940
Browse files Browse the repository at this point in the history
  • Loading branch information
duckontheweb authored Mar 17, 2022
2 parents 47f77eb + bcdf2e7 commit ad4bd63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
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
elif self.rel != pystac.RelType.ROOT:
owner_root = self.owner.get_root()
if owner_root is not None:
stac_io = owner_root._stac_io
if stac_io is None:
stac_io = pystac.StacIO.default()

Expand Down

0 comments on commit ad4bd63

Please sign in to comment.