Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
ignore the state when a job_id is specified in tasks list (#2171)
Browse files Browse the repository at this point in the history
  • Loading branch information
chkeita authored Jul 21, 2022
1 parent 8dbc971 commit 08fb29f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cli/onefuzz/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ def create(
def list(
self,
job_id: Optional[UUID_EXPANSION] = None,
state: Optional[List[enums.TaskState]] = enums.TaskState.available(),
state: Optional[List[enums.TaskState]] = None,
) -> List[models.Task]:
"""Get information about all tasks"""
self.logger.debug("list tasks")
Expand All @@ -943,6 +943,9 @@ def list(
lambda: [str(x.job_id) for x in self.onefuzz.jobs.list()],
)

if job_id_expanded is None and state is None:
state = enums.TaskState.available()

return self._req_model_list(
"GET",
models.Task,
Expand Down

0 comments on commit 08fb29f

Please sign in to comment.