Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
nofurtherinformation committed Feb 3, 2025
1 parent c420ecc commit 7054b6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion backend/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ async def get_unassigned_geoids(
results = session.execute(
stmt, {"doc_uuid": document_id, "exclude_ids": exclude_ids}
).fetchall()
return {"features": [row[0] for row in results]}
# returns a list of multipolygons of bboxes
return {"features": results}


@app.get("/api/document/{document_id}/evaluation/{summary_stat}")
Expand Down
4 changes: 2 additions & 2 deletions backend/app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)
from sqlalchemy.types import ARRAY, TEXT
from sqlalchemy import Float
from pydantic_geojson import FeatureModel
from pydantic_geojson.multi_polygon import MultiPolygonModel
from app.constants import DOCUMENT_SCHEMA
from enum import Enum
from typing import Any
Expand Down Expand Up @@ -197,7 +197,7 @@ class AssignedGEOIDS(GEOIDS):


class UnassignedBboxGeoJSONs(BaseModel):
features: list[FeatureModel]
features: list[MultiPolygonModel]


class ShatterResult(BaseModel):
Expand Down

0 comments on commit 7054b6a

Please sign in to comment.