Skip to content
This repository was archived by the owner on Jan 21, 2023. It is now read-only.

Commit 78217ca

Browse files
yt-msMidnighter
andcommitted
refactor: PR feedback
Co-authored-by: Moritz E. Beber <midnighter@posteo.net>
1 parent eda3e05 commit 78217ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/structurizr/view/view_set.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,5 @@ def copy_layout_information_from(self, source: "ViewSet") -> None:
391391
def _ensure_key_is_specific_and_unique(self, key: str) -> None:
392392
if key is None or key == "":
393393
raise ValueError("A key must be specified.")
394-
if self.get_view(key) is not None:
394+
if key in self._views:
395395
raise ValueError(f"View already exists in workspace with key '{key}'.")

0 commit comments

Comments
 (0)