Skip to content

Commit

Permalink
fix(client): fix InvalidParamsValue error of jobType in generate_jobs
Browse files Browse the repository at this point in the history
PR Closed: #1181
  • Loading branch information
graczhual committed Dec 23, 2021
1 parent 8ea4f8e commit d0e2109
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tensorbay/client/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,8 @@ class SquashAndMerge(JobMixin):
"""

_JOB_TYPE = "squashAndMerge"

def __init__(
self,
dataset_id: str,
Expand All @@ -638,7 +640,7 @@ def _generate_jobs(
offset: int = 0,
limit: int = 128,
) -> Generator[SquashAndMergeJob, None, int]:
response = self._list_jobs("SquashAndMerge", status, offset, limit)
response = self._list_jobs(self._JOB_TYPE, status, offset, limit)
for item in response["jobs"]:
yield SquashAndMergeJob.from_response_body(
item, dataset_id=self._dataset_id, client=self._client, job_updater=self._get_job
Expand Down Expand Up @@ -704,7 +706,7 @@ def create_job(
if draft_description:
arguments["description"] = draft_description

job_info = self._create_job(title, "squashAndMerge", arguments, description)
job_info = self._create_job(title, self._JOB_TYPE, arguments, description)
job = SquashAndMergeJob.from_response_body(
job_info, dataset_id=self._dataset_id, client=self._client, job_updater=self._get_job
)
Expand Down

0 comments on commit d0e2109

Please sign in to comment.