diff --git a/capella2polarion/connectors/polarion_worker.py b/capella2polarion/connectors/polarion_worker.py index 986e54e3..b60ae11d 100644 --- a/capella2polarion/connectors/polarion_worker.py +++ b/capella2polarion/connectors/polarion_worker.py @@ -427,13 +427,11 @@ def compare_and_update_work_items( def post_documents(self, documents: list[polarion_api.Document]): """Create new documents.""" - if documents: - self.client.project_client.documents.create(documents) + self.client.project_client.documents.create(documents) def update_documents(self, documents: list[polarion_api.Document]): """Update existing documents.""" - if documents: - self.client.project_client.documents.update(documents) + self.client.project_client.documents.update(documents) def get_document( self, space: str, name: str @@ -450,8 +448,7 @@ def get_document( def update_work_items(self, work_items: list[polarion_api.WorkItem]): """Update the given workitems without any additional checks.""" - if work_items: - self.client.project_client.work_items.update(work_items) + self.client.project_client.work_items.update(work_items) def load_polarion_documents( self, document_paths: t.Iterable[tuple[str, str]]