From 4eeb6d6ebf7b19af933403f754e47f5c88a691ed Mon Sep 17 00:00:00 2001 From: ewuerger Date: Tue, 29 Oct 2024 17:07:58 +0100 Subject: [PATCH 1/2] ci: Update dependencies --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0427775..e0e2fcb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ dependencies = [ "capellambse_context_diagrams>=0.5.0,<0.6", "click", "PyYAML", - "polarion-rest-api-client==1.2.1", + "polarion-rest-api-client==1.2.2", "bidict", "cairosvg", "jinja2", From 393e113af69d8e3b9fe81780eca184fc3bfe2fb4 Mon Sep 17 00:00:00 2001 From: Michael Harbarth Date: Tue, 29 Oct 2024 17:09:19 +0100 Subject: [PATCH 2/2] fix: Don't delete workitems again and again --- capella2polarion/connectors/polarion_worker.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/capella2polarion/connectors/polarion_worker.py b/capella2polarion/connectors/polarion_worker.py index 1183b06..cbf5e7f 100644 --- a/capella2polarion/connectors/polarion_worker.py +++ b/capella2polarion/connectors/polarion_worker.py @@ -146,11 +146,12 @@ def delete_orphaned_work_items( ): logger.info("Delete work item %r...", wi.id) work_items.append(wi) - try: - self.project_client.work_items.delete(work_items) - except polarion_api.PolarionApiException as error: - logger.error("Deleting work items failed. %s", error.args[0]) - raise error + + try: + self.project_client.work_items.delete(work_items) + except polarion_api.PolarionApiException as error: + logger.error("Deleting work items failed. %s", error.args[0]) + raise error self.polarion_data_repo.remove_work_items_by_capella_uuid(uuids)