From 224b3399e7b105ce64bf1f2a4370318bf2c210d4 Mon Sep 17 00:00:00 2001 From: ewuerger Date: Mon, 26 Aug 2024 14:46:46 +0200 Subject: [PATCH] fix: Attachment old checksum generation --- capella2polarion/connectors/polarion_worker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capella2polarion/connectors/polarion_worker.py b/capella2polarion/connectors/polarion_worker.py index 1c04fe65..ccadad1c 100644 --- a/capella2polarion/connectors/polarion_worker.py +++ b/capella2polarion/connectors/polarion_worker.py @@ -175,7 +175,10 @@ def compare_and_update_work_item( "Update work item %r for model element %s %r...", *log_args ) - old_checksums = {"__C2P__WORK_ITEM": old.get_current_checksum() or ""} + if not (old_checksum := old.get_current_checksum() or ""): + old_checksum = '{"__C2P__WORK_ITEM": ""}' + old_checksums = json.loads(old_checksum) + new_checksum = new.get_current_checksum() assert new_checksum is not None new_checksums = json.loads(new_checksum)