@@ -50,9 +50,7 @@ class CoreClient(AsyncBaseCoreClient):
5050 async def all_collections (self , ** kwargs ) -> Collections :
5151 """Read all collections from the database."""
5252 base_url = str (kwargs ["request" ].base_url )
53- serialized_collections = await self .database .get_all_collections (
54- base_url = base_url
55- )
53+ collection_list = await self .database .get_all_collections (base_url = base_url )
5654
5755 links = [
5856 {
@@ -71,10 +69,8 @@ async def all_collections(self, **kwargs) -> Collections:
7169 "href" : urljoin (base_url , "collections" ),
7270 },
7371 ]
74- collection_list = Collections (
75- collections = serialized_collections or [], links = links
76- )
77- return collection_list
72+
73+ return Collections (collections = collection_list , links = links )
7874
7975 @overrides
8076 async def get_collection (self , collection_id : str , ** kwargs ) -> Collection :
@@ -91,22 +87,22 @@ async def item_collection(
9187 links = []
9288 base_url = str (kwargs ["request" ].base_url )
9389
94- serialized_children , maybe_count = await self .database .get_collection_items (
90+ items , maybe_count = await self .database .get_collection_items (
9591 collection_id = collection_id , limit = limit , base_url = base_url
9692 )
9793
9894 context_obj = None
9995 if self .extension_is_enabled ("ContextExtension" ):
10096 context_obj = {
101- "returned" : len (serialized_children ),
97+ "returned" : len (items ),
10298 "limit" : limit ,
10399 }
104100 if maybe_count is not None :
105101 context_obj ["matched" ] = maybe_count
106102
107103 return ItemCollection (
108104 type = "FeatureCollection" ,
109- features = serialized_children ,
105+ features = items ,
110106 links = links ,
111107 context = context_obj ,
112108 )
0 commit comments