Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/dstack/_internal/server/routers/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ async def list_runs(
"""
Returns all runs visible to user sorted by descending `submitted_at`.
`project_name`, `repo_id`, `username`, and `only_active` can be specified as filters.
Setting `only_active` to `true` excludes finished runs and deleted runs.
Specifying `repo_id` without `project_name` returns no runs.

The results are paginated. To get the next page, pass `submitted_at` and `id` of
Expand Down
3 changes: 2 additions & 1 deletion src/dstack/_internal/server/services/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ async def list_projects_run_models(
limit: int,
ascending: bool,
) -> List[RunModel]:
filters = [RunModel.deleted == False, RunModel.project_id.in_(p.id for p in projects)]
filters = []
filters.append(RunModel.project_id.in_(p.id for p in projects))
if repo is not None:
filters.append(RunModel.repo_id == repo.id)
if runs_user is not None:
Expand Down