diff --git a/src/backend/app/projects/project_routes.py b/src/backend/app/projects/project_routes.py index e948db821d..8e4748ebfb 100644 --- a/src/backend/app/projects/project_routes.py +++ b/src/backend/app/projects/project_routes.py @@ -198,7 +198,7 @@ async def search_project( return response -@router.get("/{project_id}", response_model=project_schemas.ProjectOut) +@router.get("/{project_id}", response_model=project_schemas.ReadProject) async def read_project(project_id: int, db: Session = Depends(database.get_db)): project = await project_crud.get_project_by_id(db, project_id) if not project: diff --git a/src/backend/app/projects/project_schemas.py b/src/backend/app/projects/project_schemas.py index a40641974c..8308444aa2 100644 --- a/src/backend/app/projects/project_schemas.py +++ b/src/backend/app/projects/project_schemas.py @@ -130,7 +130,7 @@ class ProjectBase(BaseModel): author: User project_info: ProjectInfo status: ProjectStatus - location_str: str + # location_str: str outline_geojson: Optional[GeojsonFeature] = None project_tasks: Optional[List[tasks_schemas.Task]] xform_title: Optional[str] = None @@ -141,6 +141,10 @@ class ProjectBase(BaseModel): class ProjectOut(ProjectBase): project_uuid: uuid.UUID = uuid.uuid4() +class ReadProject(ProjectBase): + project_uuid: uuid.UUID = uuid.uuid4() + location_str: str + class BackgroundTaskStatus(BaseModel): status: str