summaryrefslogtreecommitdiff
path: root/django/contrib/gis/forms/widgets.py
diff options
context:
space:
mode:
authorJaeHyuck Sa <wogur981208@gmail.com>2026-01-18 02:39:05 +0900
committerJacob Walls <jacobtylerwalls@gmail.com>2026-02-06 16:19:49 -0500
commit7c54fee7760b1c61fd7f9cb7cc6a2965f4236137 (patch)
tree5013fbd602639f39ba01e83bbbc23a9d65d03255 /django/contrib/gis/forms/widgets.py
parent6380e3f01e10f815de8c0223e3fd4bacb69f3808 (diff)
Fixed #36246 -- Caught GDALException in BaseGeometryWidget.deserialize.
Signed-off-by: JaeHyuck Sa <wogur981208@gmail.com>
Diffstat (limited to 'django/contrib/gis/forms/widgets.py')
-rw-r--r--django/contrib/gis/forms/widgets.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/contrib/gis/forms/widgets.py b/django/contrib/gis/forms/widgets.py
index c8f9f1208e..9040058750 100644
--- a/django/contrib/gis/forms/widgets.py
+++ b/django/contrib/gis/forms/widgets.py
@@ -1,6 +1,7 @@
import logging
from django.contrib.gis import gdal
+from django.contrib.gis.gdal import GDALException
from django.contrib.gis.geometry import json_regex
from django.contrib.gis.geos import GEOSException, GEOSGeometry
from django.forms.widgets import Widget
@@ -36,7 +37,7 @@ class BaseGeometryWidget(Widget):
def deserialize(self, value):
try:
return GEOSGeometry(value)
- except (GEOSException, ValueError, TypeError) as err:
+ except (GEOSException, GDALException, ValueError, TypeError) as err:
logger.error("Error creating geometry from value '%s' (%s)", value, err)
return None