diff --git a/src/backend/app/db/models.py b/src/backend/app/db/models.py index fe3be857b..c5f81215b 100644 --- a/src/backend/app/db/models.py +++ b/src/backend/app/db/models.py @@ -1775,7 +1775,7 @@ def slugify(name: Optional[str]) -> Optional[str]: class DbGeometryLog(BaseModel): """Table geometry log.""" - geom: dict + geojson: dict status: GeomStatus project_id: Optional[int] = None task_id: Optional[int] = None @@ -1793,7 +1793,7 @@ async def create( for key in model_dump.keys(): columns.append(key) - if key == "geom": + if key == "geojson": value_placeholders.append(f"%({key})s::jsonb") # Must be string json for db input model_dump[key] = json.dumps(model_dump[key]) diff --git a/src/backend/app/projects/project_schemas.py b/src/backend/app/projects/project_schemas.py index f29eebf65..4e27ba2fb 100644 --- a/src/backend/app/projects/project_schemas.py +++ b/src/backend/app/projects/project_schemas.py @@ -47,11 +47,11 @@ class GeometryLogIn(BaseModel): """Geometry log insert.""" status: GeomStatus - geom: dict + geojson: dict project_id: Optional[int] = None task_id: Optional[int] = None - @field_validator("geom", mode="before") + @field_validator("geojson", mode="before") @classmethod def parse_input_geometry( cls,