Skip to content

Commit

Permalink
fix: Don't delete workitems again and again
Browse files Browse the repository at this point in the history
  • Loading branch information
micha91 committed Oct 29, 2024
1 parent 4eeb6d6 commit 393e113
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions capella2polarion/connectors/polarion_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 393e113

Please sign in to comment.