Skip to content

Commit

Permalink
fix(converters): Handle Constraints without linked text
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger committed Jan 24, 2024
1 parent e140023 commit 53c323e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion capella2polarion/converters/element_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,10 @@ def _get_linked_text(
) -> markupsafe.Markup:
"""Return sanitized markup of the given ``obj`` linked text."""
obj = converter_data.capella_element
description = obj.specification["capella:linkedText"].striptags()
default = {"capella:linkedText": markupsafe.Markup("")}
description = getattr(obj, "specification", default)[
"capella:linkedText"
].striptags()
uuids, value = self._sanitize_description(obj, description)
if uuids:
converter_data.description_references = uuids
Expand Down

0 comments on commit 53c323e

Please sign in to comment.