Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix task split issue #906

Merged
merged 3 commits into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions 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 Expand Up @@ -769,7 +772,6 @@ def split_polygon_into_tasks(
)
return []

features = json.loads(features)
log.debug(f"Project {project_id} split into {len(features)} tasks")
return features

Expand Down
Loading