Ticket #8562: 8562_onetoone_attname.diff
File 8562_onetoone_attname.diff, 534 bytes (added by , 16 years ago) |
---|
-
django/forms/models.py
117 117 data[f.name] = [obj.pk for obj in f.value_from_object(instance)] 118 118 elif isinstance(f, OneToOneField): 119 119 data[f.attname] = f.value_from_object(instance) 120 data[f.name] = data[f.attname] 120 121 else: 121 122 data[f.name] = f.value_from_object(instance) 122 123 return data