From 317ae7ec202d64dbdfa3be35bb05093c2bf376e9 Mon Sep 17 00:00:00 2001 From: Leonardo Schwarz Date: Mon, 12 Aug 2024 09:30:06 +0200 Subject: [PATCH] avoid the extra request --- bfabric/entities/storage.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bfabric/entities/storage.py b/bfabric/entities/storage.py index 3a4b17db..475427fc 100644 --- a/bfabric/entities/storage.py +++ b/bfabric/entities/storage.py @@ -16,10 +16,7 @@ def __init__(self, data_dict: dict[str, Any], client: Bfabric | None) -> None: @cached_property def scp_prefix_no_path(self) -> str: """SCP prefix without storage base path included.""" - result = self._client.read("access", {"storageid": self.id, "type": "scp"}) - if len(result) != 1: - raise ValueError(f"Expected exactly 1 SCP access for storage {self.id}, actual: {len(result)}") - return f"{result[0]['host']}:" + return f"{self.data_dict['host']}:" @cached_property def scp_prefix_full(self) -> str: