summaryrefslogtreecommitdiff
path: root/django/db/models/options.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2008-06-09 14:03:35 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2008-06-09 14:03:35 +0000
commit12716794dbcf2e1bf7a07bd18dfc0ae24be4e6f8 (patch)
treeebeae5a3a44e340afd6def0479c44b58d2548232 /django/db/models/options.py
parent1426c2451756572fccaf264ed2b752553b1c7933 (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.py2
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)