diff --git a/capella2polarion/converters/element_converter.py b/capella2polarion/converters/element_converter.py index 18f3d48..6af18e5 100644 --- a/capella2polarion/converters/element_converter.py +++ b/capella2polarion/converters/element_converter.py @@ -323,9 +323,10 @@ def repair_images(node: etree._Element) -> None: try: with filehandler.open(file_path, "r") as img: content = img.read() - file_name = hashlib.md5( - str(file_path).encode("utf8") - ).hexdigest() + file_name = ( + hashlib.md5(str(file_path).encode("utf8")).hexdigest() + + file_path.suffix + ) attachments.append( polarion_api.WorkItemAttachment( "", @@ -333,7 +334,7 @@ def repair_images(node: etree._Element) -> None: file_path.name, content, mime_type, - f"{file_name}.{file_path.suffix}", + file_name, ) ) node.attrib["src"] = f"workitemimg:{file_name}"