Ticket #2608: multilevel_fk_patch.patch
File multilevel_fk_patch.patch, 710 bytes (added by , 18 years ago) |
---|
-
django/core/management.py
167 167 pending_references = {} 168 168 for f in opts.fields: 169 169 if isinstance(f, (models.ForeignKey, models.OneToOneField)): 170 rel_field = f.rel.get_related_field() 170 # Follow keys which link to another other foreign key so we can get 171 # the actual field type. 172 while isinstance(f, models.ForeignKey): 173 f = f.rel.get_related_field() 171 174 data_type = get_rel_data_type(rel_field) 172 175 else: 173 176 rel_field = f