Skip to content

Commit

Permalink
feat: Add support for returned tuple for elk_input
Browse files Browse the repository at this point in the history
  • Loading branch information
micha91 committed Oct 28, 2024
1 parent bc8380d commit 87bcd01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion capella2polarion/data_model/work_item_attachments.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,12 @@ def content_checksum(self) -> str:
if self._checksum is None:
try:
elk_input = self.diagram.elk_input_data(self.render_params)
if isinstance(elk_input, tuple):
input_str = ";".join(eit.json() for eit in elk_input)
else:
input_str = elk_input.json()
self._checksum = hashlib.sha256(
elk_input.json().encode("utf-8")
input_str.encode("utf-8")
).hexdigest()
except Exception as e:
logger.error(
Expand Down

0 comments on commit 87bcd01

Please sign in to comment.