Skip to content

Commit

Permalink
feat: remove unnecessary field from projects schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Pradip-p committed Jul 14, 2024
1 parent f69bdd3 commit 1e6e0a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/backend/app/projects/project_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from fmtm_splitter.splitter import split_by_square
from fastapi.concurrency import run_in_threadpool
from databases import Database
from app.models.enums import ProjectStatus


async def create_project_with_project_info(
Expand Down Expand Up @@ -51,8 +52,8 @@ async def create_project_with_project_info(
"short_description": project_metadata.short_description,
"description": project_metadata.description,
"per_task_instructions": project_metadata.per_task_instructions,
"status": "DRAFT",
"visibility": "PUBLIC",
"status": ProjectStatus.DRAFT.name,
"visibility": project_metadata.visibility.name,
"outline": str(project_metadata.outline),
"no_fly_zones": str(project_metadata.no_fly_zones),
"dem_url": project_metadata.dem_url,
Expand Down
5 changes: 2 additions & 3 deletions src/backend/app/projects/project_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pydantic import BaseModel, computed_field, Field
from typing import Any, Optional, Union
from geojson_pydantic import Feature, FeatureCollection, Polygon
from app.models.enums import TaskSplitType
from app.models.enums import ProjectVisibility
from shapely import wkb
from datetime import date

Expand Down Expand Up @@ -33,8 +33,6 @@ class ProjectIn(BaseModel):
short_description: str
description: str
per_task_instructions: Optional[str] = None
organisation_id: Optional[int] = None
task_split_type: Optional[TaskSplitType] = None
task_split_dimension: Optional[int] = None
dem_url: Optional[str] = None
gsd_cm_px: float = None
Expand All @@ -45,6 +43,7 @@ class ProjectIn(BaseModel):
output_pointcloud_url: Optional[str] = None
output_raw_url: Optional[str] = None
deadline_at: Optional[date] = None
visibility: Optional[ProjectVisibility] = ProjectVisibility.PUBLIC

@computed_field
@property
Expand Down

0 comments on commit 1e6e0a4

Please sign in to comment.