Skip to content

Commit 74a7dd0

Browse files
committed
Fix instance type check logic
1 parent d1b333d commit 74a7dd0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pystac/extensions/render.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ def get_schema_uri(cls) -> str:
244244
def ext(cls, obj: T, add_if_missing: bool = False) -> RenderExtension[T]:
245245
if isinstance(obj, pystac.Collection):
246246
cls.ensure_has_extension(obj, add_if_missing)
247-
if isinstance(obj, pystac.Item):
247+
return CollectionRenderExtension(obj)
248+
elif isinstance(obj, pystac.Item):
248249
cls.ensure_has_extension(obj, add_if_missing)
249250
return ItemRenderExtension(obj)
250251
else:

0 commit comments

Comments
 (0)