Changes between Initial Version and Version 1 of Ticket #15225


Ignore:
Timestamp:
Feb 4, 2011, 6:23:59 PM (14 years ago)
Author:
Jeremy Dunck
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15225 – Description

    initial v1  
    11This seems to be because local_fields is always blank in these lines from django.db.models.base.ModelBase.__new__
    22
     3{{{
    34        # Do the appropriate setup for any model parents.
    45        o2o_map = dict([(f.rel.to, f) for f in new_class._meta.local_fields
    56                if isinstance(f, OneToOneField)])
    6 
     7}}}
    78
    89Which causes this elif branch to be taken:
    910
     11{{{
    1012                if base in o2o_map:
    1113                    field = o2o_map[base]
     
    1517                            auto_created=True, parent_link=True)
    1618                    new_class.add_to_class(attr_name, field)
     19}}}
    1720
    1821This misses the point of parent_link.
Back to Top