Ticket #7202: o2o_fixture_load_r7540.diff
File o2o_fixture_load_r7540.diff, 680 bytes (added by , 17 years ago) |
---|
-
django/core/serializers/python.py
69 69 data = {Model._meta.pk.attname : Model._meta.pk.to_python(d["pk"])} 70 70 m2m_data = {} 71 71 72 if Model._meta.pk.rel and isinstance(Model._meta.pk.rel, models.OneToOneRel): 73 rel = Model._meta.pk.rel 74 data[rel.to._meta.pk.attname] = data[Model._meta.pk.attname] 75 72 76 # Handle each field 73 77 for (field_name, field_value) in d["fields"].iteritems(): 74 78 if isinstance(field_value, str):