Skip to content

Commit 56bbec0

Browse files
committed
Adjust the owner extension check
1 parent 28044e7 commit 56bbec0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pystac/extensions/raster.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,9 @@ def ext(cls, obj: T, add_if_missing: bool = False) -> RasterExtension[T]:
729729
cls.validate_owner_has_extension(obj, add_if_missing)
730730
return cast(RasterExtension[T], AssetRasterExtension(obj))
731731
elif isinstance(obj, item_assets.AssetDefinition):
732+
cls.validate_has_extension(
733+
cast(Union[pystac.Item, pystac.Collection], obj.owner), add_if_missing
734+
)
732735
return cast(RasterExtension[T], ItemAssetsRasterExtension(obj))
733736
else:
734737
raise pystac.ExtensionTypeError(

0 commit comments

Comments
 (0)