Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit 85e13681b02257dac54ef65506a6f8ceebc8f858 1 parent 87302ac
Justin Bronn authored March 29, 2010
3  django/contrib/gis/utils/layermapping.py
@@ -205,7 +205,8 @@ def check_ogr_fld(ogr_map_fld):
205 205
                 # Making sure that the OGR Layer's Geometry is compatible.
206 206
                 ltype = self.layer.geom_type
207 207
                 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.' %
209 210
                                         (fld_name, (coord_dim == 3 and '(dim=3)') or '', ltype))
210 211
 
211 212
                 # Setting the `geom_field` attribute w/the name of the model field

0 notes on commit 85e1368

Please sign in to comment.
Something went wrong with that request. Please try again.