Skip to content

Commit 02811cd

Browse files
author
Andrei Neagu
committed
using typeadapter
1 parent 4e34ec7 commit 02811cd

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

services/storage/src/simcore_service_storage/datcore_adapter/datcore_adapter_settings.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ class DatcoreAdapterSettings(BaseCustomSettings):
1515

1616
@cached_property
1717
def endpoint(self) -> str:
18-
endpoint = AnyHttpUrl.build( # pylint:disable=no-member
19-
scheme="http",
20-
host=self.DATCORE_ADAPTER_HOST,
21-
port=self.DATCORE_ADAPTER_PORT,
22-
path=f"/{self.DATCORE_ADAPTER_VTAG}",
18+
url = TypeAdapter(AnyHttpUrl).validate_python(
19+
f"http://{self.DATCORE_ADAPTER_HOST}:{self.DATCORE_ADAPTER_PORT}/{self.DATCORE_ADAPTER_VTAG}"
2320
)
24-
return f"{endpoint}"
21+
return f"{url}"

0 commit comments

Comments
 (0)