Skip to content

Commit be14b4c

Browse files
committed
Test reading default from config
1 parent 1b5ea57 commit be14b4c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/apify/storage_clients/_apify/_alias_resolving.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ async def resolve_id(self) -> str | None:
195195
"""
196196
# First try to find the alias in the configuration mapping to avoid any API calls.
197197
# This mapping is maintained by the Apify platform and does not have to be maintained in the default KVS.
198-
if self._configuration.actor_storages and self._alias != 'default':
198+
if self._configuration.actor_storages:
199199
storage_maps = {
200200
'Dataset': self._configuration.actor_storages['datasets'],
201201
'KeyValueStore': self._configuration.actor_storages['key_value_stores'],

src/apify/storage_clients/_apify/_api_client_creation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def get_resource_client(storage_id: str) -> DatasetClientAsync:
111111
# Handle different opening scenarios
112112
match (alias, name, id, default_id):
113113
# Normalize unnamed default storage to unnamed storage aliased as `__default__`.
114-
case (None, None, None, None):
114+
case (None | 'default', None, None, None):
115115
return await open_by_alias(
116116
alias='__default__',
117117
storage_type=storage_type,

0 commit comments

Comments
 (0)