Skip to content

Commit

Permalink
fix: we should only delete the work_items once from the mapping, othe…
Browse files Browse the repository at this point in the history
…rwise all runs with more than one work item to be deleted will fail
  • Loading branch information
micha91 committed Sep 4, 2024
1 parent 1b775ba commit 6abc00a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions capella2polarion/connectors/polarion_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,12 @@ def delete_orphaned_work_items(
work_items.append(wi)
try:
self.project_client.work_items.delete(work_items)
self.polarion_data_repo.remove_work_items_by_capella_uuid(
uuids
)
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)

def create_missing_work_items(
self, converter_session: data_session.ConverterSession
) -> None:
Expand Down

0 comments on commit 6abc00a

Please sign in to comment.