Skip to content

Commit 5575c20

Browse files
committed
tmp
1 parent 1008fa5 commit 5575c20

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/apify/storage_clients/_apify/_utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)