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(
38
38
try :
39
39
record = await default_kvs_client .get_record (_ALIAS_MAPPING_KEY )
40
40
41
+ # get_record can return {key: ..., value: ..., content_type: ...}
42
+ if isinstance (record , dict ) and 'value' in record :
43
+ record = record ['value' ]
44
+
41
45
# Extract the actual data from the KVS record
42
46
if isinstance (record , dict ) and alias_key in record :
43
47
storage_id = record [alias_key ]
@@ -72,6 +76,10 @@ async def store_alias_mapping(
72
76
try :
73
77
record = await default_kvs_client .get_record (_ALIAS_MAPPING_KEY )
74
78
79
+ # get_record can return {key: ..., value: ..., content_type: ...}
80
+ if isinstance (record , dict ) and 'value' in record :
81
+ record = record ['value' ]
82
+
75
83
# Update or create the record with the new alias mapping
76
84
if isinstance (record , dict ):
77
85
record [alias_key ] = storage_id
You can’t perform that action at this time.
0 commit comments