Skip to content

Commit d560419

Browse files
Fix settings not subscriptable
1 parent 7e30df8 commit d560419

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/isar/storage/blob_storage.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,19 @@ def __init__(self) -> None:
2222

2323
self.container_client_data = self._get_container_client(
2424
settings.BLOB_STORAGE_ACCOUNT_DATA,
25-
"BLOB_STORAGE_CONNECTION_STRING_DATA",
25+
settings.BLOB_STORAGE_CONNECTION_STRING_DATA,
2626
)
2727
self.container_client_metadata = self._get_container_client(
2828
settings.BLOB_STORAGE_ACCOUNT_METADATA,
29-
"BLOB_STORAGE_CONNECTION_STRING_METADATA",
29+
settings.BLOB_STORAGE_CONNECTION_STRING_METADATA,
3030
)
3131

3232
def _get_container_client(
33-
self, account_name: str, setting_secret_name: str
33+
self, account_name: str, storage_connection_string: str
3434
) -> ContainerClient:
35-
storage_connection_string = settings[setting_secret_name]
3635

3736
if not storage_connection_string:
38-
raise RuntimeError(f"{setting_secret_name} is Empty or None")
37+
raise RuntimeError("BlobStorage connection string is Empty or None")
3938

4039
try:
4140
blob_service_client = BlobServiceClient.from_connection_string(

0 commit comments

Comments
 (0)