Changes between Initial Version and Version 1 of Ticket #15225
- Timestamp:
- Feb 4, 2011, 6:23:59 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #15225 – Description
initial v1 1 1 This seems to be because local_fields is always blank in these lines from django.db.models.base.ModelBase.__new__ 2 2 3 {{{ 3 4 # Do the appropriate setup for any model parents. 4 5 o2o_map = dict([(f.rel.to, f) for f in new_class._meta.local_fields 5 6 if isinstance(f, OneToOneField)]) 6 7 }}} 7 8 8 9 Which causes this elif branch to be taken: 9 10 11 {{{ 10 12 if base in o2o_map: 11 13 field = o2o_map[base] … … 15 17 auto_created=True, parent_link=True) 16 18 new_class.add_to_class(attr_name, field) 19 }}} 17 20 18 21 This misses the point of parent_link.