Skip to content

Commit

Permalink
fix voor tests not found
Browse files Browse the repository at this point in the history
  • Loading branch information
DRIESASTER committed May 20, 2024
1 parent 6e86cd4 commit dc66f0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions backend/src/project/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ async def retrieve_project(project_id: int,


async def retrieve_test_files_uuid(project: Project = Depends(retrieve_project)):
if project.test_files_uuid is None:
raise TestsNotFound
return project.test_files_uuid


Expand Down
6 changes: 4 additions & 2 deletions backend/src/project/router.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Sequence, List
from typing import Sequence, List, Optional

from docker import DockerClient
from fastapi import APIRouter, Depends, UploadFile, BackgroundTasks
Expand Down Expand Up @@ -85,7 +85,9 @@ async def list_submissions(project_id: int,


@router.get("/{project_id}/test_files")
async def get_test_files(test_files_uuid: str = Depends(retrieve_test_files_uuid)):
async def get_test_files(test_files_uuid: Optional[str] = Depends(retrieve_test_files_uuid)):
if not test_files_uuid:
return []
return get_files_from_dir(tests_path(test_files_uuid))


Expand Down

0 comments on commit dc66f0d

Please sign in to comment.