Skip to content

Commit

Permalink
Update summaries to use validate_has_extension with add_if_missing
Browse files Browse the repository at this point in the history
  • Loading branch information
lossyrob committed Jul 15, 2021
1 parent a686e8c commit 30a272d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pystac/extensions/pointcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 486,7 @@ def ext(cls, obj: T, add_if_missing: bool = False) -> "PointcloudExtension[T]":
def summaries(
cls, obj: pystac.Collection, add_if_missing: bool = False
) -> "SummariesPointcloudExtension":
if not add_if_missing:
cls.validate_has_extension(obj)
else:
cls.add_to(obj)
cls.validate_has_extension(obj, add_if_missing)
return SummariesPointcloudExtension(obj)


Expand Down

0 comments on commit 30a272d

Please sign in to comment.