Skip to content

Commit

Permalink
fix: issue when single feature polygon uploaded to upload multi polyg…
Browse files Browse the repository at this point in the history
…on api
  • Loading branch information
sujanadh committed Oct 12, 2023
1 parent ff26553 commit a91442c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/backend/app/projects/project_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,10 @@ def update_multi_polygon_project_boundary(
return False

# Update the boundary polyon on the database.
polygons = boundary["features"]
if boundary["type"]=="Feature":
polygons = [boundary]
else:
polygons = boundary["features"]
log.debug(f"Processing {len(polygons)} task geometries")
for polygon in polygons:
# If the polygon is a MultiPolygon, convert it to a Polygon
Expand Down

0 comments on commit a91442c

Please sign in to comment.