From b75665501f4ca4fa3f48c06d109184a78a8de055 Mon Sep 17 00:00:00 2001 From: pedro-cf Date: Tue, 30 Apr 2024 13:33:49 +0100 Subject: [PATCH 1/3] core create_item fix --- stac_fastapi/core/stac_fastapi/core/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stac_fastapi/core/stac_fastapi/core/core.py b/stac_fastapi/core/stac_fastapi/core/core.py index 936b2553..053c8395 100644 --- a/stac_fastapi/core/stac_fastapi/core/core.py +++ b/stac_fastapi/core/stac_fastapi/core/core.py @@ -677,7 +677,7 @@ async def create_item( else: item = await self.database.prep_create_item(item=item, base_url=base_url) await self.database.create_item(item, refresh=kwargs.get("refresh", False)) - return item + return ItemSerializer.db_to_stac(item, base_url) @overrides async def update_item( From 66dbf6872ca3713be422c4511ebce94a1b7e2e5d Mon Sep 17 00:00:00 2001 From: pedro-cf Date: Tue, 30 Apr 2024 13:38:35 +0100 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d4aab32..1a628207 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fixed + +- Fixed `POST /collections/test-collection/items` returning an item with an empty links array. + ## [v2.3.0] ### Changed From 3d3519da5bef5a885c5a8000c89777307f75529c Mon Sep 17 00:00:00 2001 From: pedro-cf Date: Tue, 30 Apr 2024 16:01:50 +0100 Subject: [PATCH 3/3] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a628207..9deead23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed -- Fixed `POST /collections/test-collection/items` returning an item with an empty links array. +- Fixed `POST /collections/test-collection/items` returning an item with an empty links array [#236](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/236) ## [v2.3.0]