Skip to content

Commit 30a272d

Browse files
committed
Update summaries to use validate_has_extension with add_if_missing
1 parent a686e8c commit 30a272d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pystac/extensions/pointcloud.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,10 +486,7 @@ def ext(cls, obj: T, add_if_missing: bool = False) -> "PointcloudExtension[T]":
486486
def summaries(
487487
cls, obj: pystac.Collection, add_if_missing: bool = False
488488
) -> "SummariesPointcloudExtension":
489-
if not add_if_missing:
490-
cls.validate_has_extension(obj)
491-
else:
492-
cls.add_to(obj)
489+
cls.validate_has_extension(obj, add_if_missing)
493490
return SummariesPointcloudExtension(obj)
494491

495492

0 commit comments

Comments
 (0)