Skip to content

Commit

Permalink
hotfix: location str in create project (#1073)
Browse files Browse the repository at this point in the history
Co-authored-by: sujanadh <sujanadh07@gmail.com>
  • Loading branch information
Sujanadh and sujanadh authored Jan 1, 2024
1 parent 1228ec9 commit 6a7da9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/backend/app/projects/project_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 5 additions & 1 deletion src/backend/app/projects/project_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6a7da9a

Please sign in to comment.