Ticket #17018: layermapping.2.patch
File layermapping.2.patch, 975 bytes (added by , 13 years ago) |
---|
-
django/contrib/gis/utils/layermapping.py
295 295 elif isinstance(model_field, models.base.ModelBase): 296 296 # The related _model_, not a field was passed in -- indicating 297 297 # another mapping for the related Model. 298 val = self.verify_fk(feat, model_field, ogr_name) 298 try: 299 val = self.verify_fk(feat, model_field, ogr_name) 300 except MissingForeignKey: 301 if self.model._meta.get_field(field_name).null: 302 val = None 303 else: 304 raise 299 305 else: 300 306 # Otherwise, verify OGR Field type. 301 307 val = self.verify_ogr_field(feat[ogr_name], model_field)