Ticket #17018: layermapping.patch
File layermapping.patch, 909 bytes (added by , 13 years ago) |
---|
-
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, mfk: 301 if self.model._meta.get_field(field_name).null: 302 val = None 303 else: 304 raise mfk 299 305 else: 300 306 # Otherwise, verify OGR Field type. 301 307 val = self.verify_ogr_field(feat[ogr_name], model_field)