Skip to content

Commit 7e81174

Browse files
committed
fix: only stringify present tags
fix #4
1 parent 91f5f75 commit 7e81174

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/structurizr/model/model_item.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ def split_tags(cls, tags: Union[str, List[str]]) -> List[str]:
5555
def dict(self, **kwargs) -> dict:
5656
""""""
5757
obj = super().dict(**kwargs)
58-
obj["tags"] = ",".join(obj["tags"])
58+
if "tags" in obj and len(obj["tags"]) > 0:
59+
obj["tags"] = ",".join(obj["tags"])
5960
return obj
6061

6162

0 commit comments

Comments
 (0)