summaryrefslogtreecommitdiff
path: root/django/core/serializers/python.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2007-01-27 13:42:51 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2007-01-27 13:42:51 +0000
commitdb8525cc01e52a423c2d4508c68614299948a11d (patch)
tree59f96ccb08d52227e20a2852ed7713caf613fdfb /django/core/serializers/python.py
parent54feaca70f77b39093fe417dcd89eb7c74930e2e (diff)
Fixed a flaw in the serializers that prevented OneToOneFields being serialized as JSON objects.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4433 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/serializers/python.py')
-rw-r--r--django/core/serializers/python.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py
index 859816c226..1e1e6f4bec 100644
--- a/django/core/serializers/python.py
+++ b/django/core/serializers/python.py
@@ -57,7 +57,7 @@ def Deserializer(object_list, **options):
for d in object_list:
# Look up the model and starting build a dict of data for it.
Model = _get_model(d["model"])
- data = {Model._meta.pk.name : d["pk"]}
+ data = {Model._meta.pk.attname : d["pk"]}
m2m_data = {}
# Handle each field