Skip to content

Commit 9cbce13

Browse files
committed
Updating doc strings.
1 parent 0ed5947 commit 9cbce13

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/core.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,8 +660,11 @@ async def update_collection(
660660
Update a collection.
661661
662662
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.
665668
666669
Args:
667670
collection: A STAC collection that needs to be updated.

stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ async def update_collection(
771771
Args:
772772
self: The instance of the object calling this function.
773773
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.
775775
776776
Raises:
777777
NotFoundError: If the collection with the given `collection_id` is not

0 commit comments

Comments
 (0)