Skip to content

Commit 85e1368

Browse files
committed
Fixed #11785 -- Clarified error message when the layer geometry type doesn't match the model field. Thanks, esizikov for bug report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12880 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 87302ac commit 85e1368

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

django/contrib/gis/utils/layermapping.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ def check_ogr_fld(ogr_map_fld):
205205
# Making sure that the OGR Layer's Geometry is compatible.
206206
ltype = self.layer.geom_type
207207
if not (ltype.name.startswith(gtype.name) or self.make_multi(ltype, model_field)):
208-
raise LayerMapError('Invalid mapping geometry; model has %s%s, layer is %s.' %
208+
raise LayerMapError('Invalid mapping geometry; model has %s%s, '
209+
'layer geometry type is %s.' %
209210
(fld_name, (coord_dim == 3 and '(dim=3)') or '', ltype))
210211

211212
# Setting the `geom_field` attribute w/the name of the model field

0 commit comments

Comments
 (0)