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/core | |
| 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/core')
| -rw-r--r-- | django/core/serializers/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/serializers/base.py b/django/core/serializers/base.py index a79497ecec..e22a35815b 100644 --- a/django/core/serializers/base.py +++ b/django/core/serializers/base.py @@ -38,7 +38,7 @@ class Serializer(object): self.start_serialization() for obj in queryset: self.start_object(obj) - for field in obj._meta.fields: + for field in obj._meta.local_fields: if field.serialize: if field.rel is None: if self.selected_fields is None or field.attname in self.selected_fields: |
