Skip to content

Commit

Permalink
Handle GEOSExceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Lukach committed Mar 27, 2017
1 parent 27691f7 commit 4a12c41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cadasta/organization/importers/validators.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from functools import partial

from django.contrib.gis.geos import GEOSGeometry
from django.contrib.gis.geos import GEOSGeometry, GEOSException
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext as _

Expand Down Expand Up @@ -43,7 +43,7 @@ def validate_row(headers, row, config):
else:
try:
geometry = GEOSGeometry(coords)
except ValueError:
except (ValueError, GEOSException):
try:
geometry = GEOSGeometry(odk_geom_to_wkt(coords))
except InvalidODKGeometryError:
Expand Down

0 comments on commit 4a12c41

Please sign in to comment.