Skip to content

Commit bfbd129

Browse files
authored
fix: remove troublesome assertion (#549)
Couple of things going on here: - Without stac-utils/pystac#1171, the resolved collection won't have a root. - Even with stac-utils/pystac#1171, the root will be cast to a `Catalog` by https://github.com/stac-utils/pystac/blob/9b363db07f19692d319804ccffce23b72d759839/pystac/stac_object.py#L275-L292, so this assertion would fail even with the preserve_dict To fix breakages to existing code, we remove the assertion, and assume that stuff will blow up later if the `root` isn't the correct object type.
1 parent 1e2268d commit bfbd129

File tree

4 files changed

+678
-1
lines changed

4 files changed

+678
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Remove troublesome assertion [#549](https://github.com/stac-utils/pystac-client/pull/549)
13+
1014
## [v0.7.1] - 2023-06-13
1115

1216
### Fixed

pystac_client/stac_api_io.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ def stac_object_from_dict(
267267
return result
268268

269269
if info.object_type == pystac.STACObjectType.COLLECTION:
270-
assert isinstance(root, pystac_client.client.Client)
271270
return pystac_client.collection_client.CollectionClient.from_dict(
272271
d, href=str(href), root=root, migrate=False, preserve_dict=preserve_dict
273272
)

0 commit comments

Comments
 (0)