@@ -820,7 +820,11 @@ async def patch_item(
820
820
if item :
821
821
return ItemSerializer .db_to_stac (item , base_url = base_url )
822
822
823
- raise NotImplementedError ("Content-Type and body combination not implemented" )
823
+ raise NotImplementedError (
824
+ "Content-Type: %s and body: %s combination not implemented" ,
825
+ content_type ,
826
+ patch ,
827
+ )
824
828
825
829
@overrides
826
830
async def delete_item (self , item_id : str , collection_id : str , ** kwargs ) -> None :
@@ -903,7 +907,8 @@ async def update_collection(
903
907
extensions = [type (ext ).__name__ for ext in self .database .extensions ],
904
908
)
905
909
906
- def patch_collection (
910
+ @overrides
911
+ async def patch_collection (
907
912
self ,
908
913
collection_id : str ,
909
914
patch : Union [stac_types .PartialCollection , List [stac_types .PatchOperation ]],
@@ -925,7 +930,7 @@ def patch_collection(
925
930
926
931
collection = None
927
932
if isinstance (patch , list ) and content_type == "application/json-patch+json" :
928
- collection = self .database .json_patch_collection (
933
+ collection = await self .database .json_patch_collection (
929
934
collection_id = collection_id ,
930
935
operations = patch ,
931
936
base_url = base_url ,
@@ -936,7 +941,7 @@ def patch_collection(
936
941
"application/json" ,
937
942
]:
938
943
patch = partialCollectionValidator .validate_python (patch )
939
- collection = self .database .merge_patch_collection (
944
+ collection = await self .database .merge_patch_collection (
940
945
collection_id = collection_id ,
941
946
collection = patch ,
942
947
base_url = base_url ,
@@ -949,7 +954,11 @@ def patch_collection(
949
954
extensions = [type (ext ).__name__ for ext in self .database .extensions ],
950
955
)
951
956
952
- raise NotImplementedError ("Content-Type and body combination not implemented" )
957
+ raise NotImplementedError (
958
+ "Content-Type: %s and body: %s combination not implemented" ,
959
+ content_type ,
960
+ patch ,
961
+ )
953
962
954
963
@overrides
955
964
async def delete_collection (self , collection_id : str , ** kwargs ) -> None :
0 commit comments