Browse files

[1.1.X] Fixed #11785 -- Clarified error message when the layer geomet…

…ry type doesn't match the model field. Thanks, esizikov for bug report and initial patch.

Backport of r12880 from trunk.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
jbronn committed Mar 29, 2010
1 parent ceb5261 commit 08d00942d057bdf9a7a7da650657c88bc23a08e1
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/contrib/gis/utils/
@@ -290,7 +290,8 @@ def check_ogr_fld(ogr_map_fld):
# Making sure that the OGR Layer's Geometry is compatible.
ltype = self.layer.geom_type
if not (gtype == ltype or self.make_multi(ltype, model_field)):
- raise LayerMapError('Invalid mapping geometry; model has %s, feature has %s.' % (fld_name, gtype))
+ raise LayerMapError('Invalid mapping geometry; model has %s, '
+ 'layer geometry type is %s.' % (fld_name, ltype))
# Setting the `geom_field` attribute w/the name of the model field
# that is a Geometry.

0 comments on commit 08d0094

Please sign in to comment.