Skip to content

Commit

Permalink
fix: do not delete project on boundary update fail
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Dec 11, 2023
1 parent 9cd61aa commit 3a84138
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/backend/app/projects/project_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,10 +689,6 @@ def remove_z_dimension(coord):
}
]
else:
# Delete the created Project
db.delete(db_project)
db.commit()

# Raise an exception
raise HTTPException(
status_code=400, detail=f"Invalid GeoJSON type: {boundary['type']}"
Expand All @@ -705,7 +701,7 @@ def remove_z_dimension(coord):
if feature["geometry"]["type"] == "MultiPolygon":
multi_polygons.append(Polygon(feature["geometry"]["coordinates"][0][0]))

"""Update the boundary polyon on the database."""
"""Update the boundary polygon on the database."""
if multi_polygons:
outline = multi_polygons[0]
for geom in multi_polygons[1:]:
Expand Down

0 comments on commit 3a84138

Please sign in to comment.