Skip to content

Commit 8490c6f

Browse files
jonhealy1gadomski
andauthored
Update stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/core.py
Co-authored-by: Pete Gadomski <pete.gadomski@gmail.com>
1 parent 029af86 commit 8490c6f

File tree

1 file changed

+2
-3
lines changed
  • stac_fastapi/elasticsearch/stac_fastapi/elasticsearch

1 file changed

+2
-3
lines changed

stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/core.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,8 @@ async def item_collection(
106106
collection = await self.get_collection(
107107
collection_id=collection_id, request=request
108108
)
109-
try:
110-
collection_id = collection["id"]
111-
except Exception:
109+
collection_id = collection.get("id")
110+
if collection_id is None:
112111
raise HTTPException(status_code=404, detail="Collection not found")
113112

114113
search = self.database.make_search()

0 commit comments

Comments
 (0)