Skip to content

Commit

Permalink
chore: remove unnecessary checks
Browse files Browse the repository at this point in the history
  • Loading branch information
micha91 committed Aug 16, 2024
1 parent 96d47c4 commit 4282892
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions capella2polarion/connectors/polarion_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]]
Expand Down

0 comments on commit 4282892

Please sign in to comment.