File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/apify/storage_clients/_apify Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ async def resolve_alias_to_id(
3838 try :
3939 record = await default_kvs_client .get_record (_ALIAS_MAPPING_KEY )
4040
41+ # get_record can return {key: ..., value: ..., content_type: ...}
42+ if isinstance (record , dict ) and 'value' in record :
43+ record = record ['value' ]
44+
4145 # Extract the actual data from the KVS record
4246 if isinstance (record , dict ) and alias_key in record :
4347 storage_id = record [alias_key ]
@@ -72,6 +76,10 @@ async def store_alias_mapping(
7276 try :
7377 record = await default_kvs_client .get_record (_ALIAS_MAPPING_KEY )
7478
79+ # get_record can return {key: ..., value: ..., content_type: ...}
80+ if isinstance (record , dict ) and 'value' in record :
81+ record = record ['value' ]
82+
7583 # Update or create the record with the new alias mapping
7684 if isinstance (record , dict ):
7785 record [alias_key ] = storage_id
You can’t perform that action at this time.
0 commit comments