Skip to content

Commit 5b25a43

Browse files
committed
Update SarExtension.summaries
1 parent 2c0cc84 commit 5b25a43

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pystac/extensions/sar.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,7 @@ def summaries(
335335
cls, obj: pystac.Collection, add_if_missing: bool = False
336336
) -> "SummariesSarExtension":
337337
"""Returns the extended summaries object for the given collection."""
338-
if not add_if_missing:
339-
cls.validate_has_extension(obj)
340-
else:
341-
cls.add_to(obj)
338+
cls.validate_has_extension(obj, add_if_missing)
342339
return SummariesSarExtension(obj)
343340

344341

0 commit comments

Comments
 (0)