Skip to content

Commit

Permalink
fix: outline geojson of project in project details api (#825)
Browse files Browse the repository at this point in the history
* fix: outline geojson of project in project details api

* updated project schemas
  • Loading branch information
nrjadkry authored Sep 11, 2023
1 parent 9d117a3 commit 22f8289
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/backend/app/projects/project_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from typing import List, Union, Optional

from geojson_pydantic import Feature
from geojson_pydantic import Feature as GeojsonFeature
from pydantic import BaseModel

from ..models.enums import ProjectPriority, ProjectStatus
Expand All @@ -39,17 +39,17 @@ class ProjectInfo(BaseModel):


class ProjectUpdate(BaseModel):
name: Union[str, None]
short_description: Union[str, None]
description: Union[str, None]
name: Optional[str] = None
short_description: Optional[str] = None
description: Optional[str] = None


class BETAProjectUpload(BaseModel):
author: User
project_info: ProjectInfo
xform_title: Union[str, None]
odk_central: ODKCentral
hashtags: Union[List[str], None]
hashtags: Optional[List[str]] = None
organisation_id: Optional[int] = None
# city: str
# country: str
Expand All @@ -59,7 +59,7 @@ class Feature(BaseModel):
id: int
project_id: int
task_id: Optional[int] = None
geometry: Optional[Feature] = None
geometry: Optional[GeojsonFeature] = None


class ProjectSummary(BaseModel):
Expand All @@ -86,7 +86,7 @@ class ProjectBase(BaseModel):
project_info: List[ProjectInfo]
status: ProjectStatus
# location_str: str
# outline_geojson: Optional[Feature]
outline_geojson: Optional[GeojsonFeature] = None
project_tasks: Optional[List[tasks_schemas.Task]]
xform_title: Optional[str] = None
hashtags: Optional[List[str]] = None
Expand Down

0 comments on commit 22f8289

Please sign in to comment.