diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2008-06-09 14:03:35 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2008-06-09 14:03:35 +0000 |
| commit | 12716794dbcf2e1bf7a07bd18dfc0ae24be4e6f8 (patch) | |
| tree | ebeae5a3a44e340afd6def0479c44b58d2548232 /django/db/models/options.py | |
| parent | 1426c2451756572fccaf264ed2b752553b1c7933 (diff) | |
Fixed #7350, #7202 -- Fixed serialization for multi-model inheritance, which had multiple problems:
* Serializers were including all superclass fields in their output. Now only local fields are included.
* Implicit OneToOne primary keys were not correctly added to the metamodel, so they were always marked to be serialized, even though they were primary
* Model saving was too aggressive about creating new parent class instances during deserialization. Raw save on a model now skips saving of the parent class.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/options.py')
| -rw-r--r-- | django/db/models/options.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/options.py b/django/db/models/options.py index 4036bfb36e..bc1aec62c1 100644 --- a/django/db/models/options.py +++ b/django/db/models/options.py @@ -102,7 +102,7 @@ class Options(object): # field. field = self.parents.value_for_index(0) field.primary_key = True - self.pk = field + self.setup_pk(field) else: auto = AutoField(verbose_name='ID', primary_key=True, auto_created=True) |
