From f79913e43c1d4bb439643c0316f3db557cc26a4f Mon Sep 17 00:00:00 2001 From: Vincent Sarago Date: Wed, 11 Oct 2023 13:41:30 +0200 Subject: [PATCH] use href is absolute is none (#644) --- CHANGES.md | 4 ++++ rio_tiler/io/stac.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index de2eb99f..24771ea9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,8 @@ +# 6.2.3 (2023-10-11) + +* in `STACReader` use `href` if `get_absolute_href()` returns `None` + # 6.2.2 (2023-10-05) * add list of assets in `InvalidAssetName` message in `STACReader` diff --git a/rio_tiler/io/stac.py b/rio_tiler/io/stac.py index fed63962..b30339b4 100644 --- a/rio_tiler/io/stac.py +++ b/rio_tiler/io/stac.py @@ -298,7 +298,7 @@ def _get_asset_info(self, asset: str) -> AssetInfo: extras = asset_info.extra_fields info = AssetInfo( - url=asset_info.get_absolute_href(), + url=asset_info.get_absolute_href() or asset_info.href, metadata=extras, )