File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
stac_fastapi/elasticsearch/stac_fastapi/elasticsearch Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -660,8 +660,11 @@ async def update_collection(
660
660
Update a collection.
661
661
662
662
This method updates an existing collection in the database by first finding
663
- the collection by its id, then deleting the old version, and finally creating
664
- a new version of the updated collection. The updated collection is then returned.
663
+ the collection by the id given in the keyword argument `collection_id`.
664
+ If no `collection_id` is given the id of the given collection object is used.
665
+ If the object and keyword collection ids don't match the sub items
666
+ collection id is updated else the items are left unchanged.
667
+ The updated collection is then returned.
665
668
666
669
Args:
667
670
collection: A STAC collection that needs to be updated.
Original file line number Diff line number Diff line change @@ -771,7 +771,7 @@ async def update_collection(
771
771
Args:
772
772
self: The instance of the object calling this function.
773
773
collection_id (str): The ID of the collection to be updated.
774
- collection (Collection): The Collection object to be updated .
774
+ collection (Collection): The Collection object to be used for the update .
775
775
776
776
Raises:
777
777
NotFoundError: If the collection with the given `collection_id` is not
You can’t perform that action at this time.
0 commit comments