File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/apify/storage_clients/_apify Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,10 @@ async def get_metadata(self) -> ApifyRequestQueueMetadata:
102102 modified_at = max (modified_at , self ._implementation .metadata .modified_at ),
103103 accessed_at = max (accessed_at , self ._implementation .metadata .accessed_at ),
104104 had_multiple_clients = response .had_multiple_clients or self ._implementation .metadata .had_multiple_clients ,
105- stats = RequestQueueStats .model_validate (response .stats , by_alias = True ), # ty: ignore[possibly-missing-attribute]
105+ stats = RequestQueueStats .model_validate (
106+ response .stats .model_dump (by_alias = True ) if response .stats else {},
107+ by_alias = True ,
108+ ),
106109 )
107110
108111 @classmethod
@@ -151,7 +154,7 @@ async def open(
151154 raw_metadata = await api_client .get ()
152155 if raw_metadata is None :
153156 raise ValueError ('Failed to retrieve request queue metadata from the API.' )
154- metadata = ApifyRequestQueueMetadata .model_validate (raw_metadata )
157+ metadata = ApifyRequestQueueMetadata .model_validate (raw_metadata . model_dump ( by_alias = True ) )
155158
156159 return cls (
157160 api_client = api_client ,
You can’t perform that action at this time.
0 commit comments