Skip to content

Commit

Permalink
Fix Geos Polygon instance. (#816)
Browse files Browse the repository at this point in the history
Co-authored-by: wlorenzetti <[email protected]>
  • Loading branch information
wlorenzetti and wlorenzetti authored Apr 17, 2024
1 parent 48c0440 commit d3b2a76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions g3w-admin/editing/receivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ def validate_constraint(**kwargs):
geom_class = getattr(geos, geom_type)

# For multi geometry type
if geom_type == "Polygon":
coords = coords[0]

if geom_type == "MultiPolygon":
Polygon = getattr(geos, "Polygon")
coords = [Polygon(p) for p in coords[0]]
Expand Down

0 comments on commit d3b2a76

Please sign in to comment.