1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

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
This commit is contained in:
Russell Keith-Magee
2007-01-27 13:42:51 +00:00
parent 54feaca70f
commit db8525cc01
2 changed files with 22 additions and 1 deletions

View File

@@ -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