Skip to content

Commit 25fdaa2

Browse files
committed
Fix parallel force_create_namespace call
1 parent 1a804a2 commit 25fdaa2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

horizon_hwm_store/horizon_hwm_store.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33
from __future__ import annotations
44

5-
from typing import Optional
5+
from typing import Optional, cast
66

77
from etl_entities.hwm import HWM, HWMTypeRegistry
88
from etl_entities.hwm_store import BaseHWMStore, register_hwm_store_class
@@ -232,6 +232,8 @@ def force_create_namespace(self) -> HorizonHWMStore:
232232
self._namespace_id = namespace.id # noqa: WPS601
233233
except EntityAlreadyExistsError:
234234
namespace = self._get_namespace(self.namespace)
235+
namespace = cast("NamespaceResponseV1", namespace)
236+
self._namespace_id = namespace.id # noqa: WPS601
235237
return self
236238

237239
# LoginPassword, RetryConfig and TimeoutConfig can be inherited from Pydantic v2 BaseModel

0 commit comments

Comments
 (0)